jaraco.postgres / libpq_fe.py

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
from ctypes import *

STRING = c_char_p
WSTRING = c_wchar_p
_libraries = {}
_libraries['libpq.dll'] = CDLL(r'c:\program files\postgresql\lib\libpq.dll')


CONNECTION_BAD = 1
PGRES_EMPTY_QUERY = 0
PQERRORS_DEFAULT = 1
PGRES_POLLING_FAILED = 0
CONNECTION_AWAITING_RESPONSE = 4
CONNECTION_OK = 0
PGRES_COMMAND_OK = 1
PGRES_FATAL_ERROR = 7
PGRES_NONFATAL_ERROR = 6
PQTRANS_INERROR = 3
CONNECTION_SETENV = 6
PGRES_COPY_OUT = 3
CONNECTION_MADE = 3
CONNECTION_AUTH_OK = 5
PGRES_COPY_IN = 4
CONNECTION_STARTED = 2
PQTRANS_IDLE = 0
CONNECTION_SSL_STARTUP = 7
PGRES_TUPLES_OK = 2
PQTRANS_ACTIVE = 1
PGRES_POLLING_OK = 3
PQERRORS_TERSE = 0
PQTRANS_INTRANS = 2
PGRES_BAD_RESPONSE = 5
PQTRANS_UNKNOWN = 4
PQERRORS_VERBOSE = 2
PGRES_POLLING_READING = 1
PGRES_POLLING_WRITING = 2
PGRES_POLLING_ACTIVE = 4
CONNECTION_NEEDED = 8
class _iobuf(Structure):
    pass
_iobuf._fields_ = [
    ('_ptr', STRING),
    ('_cnt', c_int),
    ('_base', STRING),
    ('_flag', c_int),
    ('_file', c_int),
    ('_charbuf', c_int),
    ('_bufsiz', c_int),
    ('_tmpfname', STRING),
]
FILE = _iobuf
fpos_t = c_longlong
uintptr_t = c_uint
va_list = STRING
size_t = c_uint
rsize_t = size_t
intptr_t = c_int
ptrdiff_t = c_int
wint_t = c_ushort
wctype_t = c_ushort
errcode = c_int
errno_t = c_int
__time32_t = c_long
__time64_t = c_longlong
time_t = __time64_t
class threadmbcinfostruct(Structure):
    pass
threadmbcinfostruct._fields_ = [
]
class threadlocaleinfostruct(Structure):
    pass
pthreadlocinfo = POINTER(threadlocaleinfostruct)
pthreadmbcinfo = POINTER(threadmbcinfostruct)
class __lc_time_data(Structure):
    pass
__lc_time_data._fields_ = [
]
class localeinfo_struct(Structure):
    pass
localeinfo_struct._fields_ = [
    ('locinfo', pthreadlocinfo),
    ('mbcinfo', pthreadmbcinfo),
]
_locale_tstruct = localeinfo_struct
_locale_t = POINTER(localeinfo_struct)
class tagLC_ID(Structure):
    pass
tagLC_ID._fields_ = [
    ('wLanguage', c_ushort),
    ('wCountry', c_ushort),
    ('wCodePage', c_ushort),
]
LPLC_ID = POINTER(tagLC_ID)
LC_ID = tagLC_ID
class N22threadlocaleinfostruct3DOLLAR_0E(Structure):
    pass
N22threadlocaleinfostruct3DOLLAR_0E._fields_ = [
    ('locale', STRING),
    ('wlocale', WSTRING),
    ('refcount', POINTER(c_int)),
    ('wrefcount', POINTER(c_int)),
]
class lconv(Structure):
    pass
threadlocaleinfostruct._fields_ = [
    ('refcount', c_int),
    ('lc_codepage', c_uint),
    ('lc_collate_cp', c_uint),
    ('lc_handle', c_ulong * 6),
    ('lc_id', LC_ID * 6),
    ('lc_category', N22threadlocaleinfostruct3DOLLAR_0E * 6),
    ('lc_clike', c_int),
    ('mb_cur_max', c_int),
    ('lconv_intl_refcount', POINTER(c_int)),
    ('lconv_num_refcount', POINTER(c_int)),
    ('lconv_mon_refcount', POINTER(c_int)),
    ('lconv', POINTER(lconv)),
    ('ctype1_refcount', POINTER(c_int)),
    ('ctype1', POINTER(c_ushort)),
    ('pctype', POINTER(c_ushort)),
    ('pclmap', POINTER(c_ubyte)),
    ('pcumap', POINTER(c_ubyte)),
    ('lc_time_curr', POINTER(__lc_time_data)),
]
lconv._fields_ = [
]
threadlocinfo = threadlocaleinfostruct

# values for enumeration 'ConnStatusType'
ConnStatusType = c_int # enum

# values for enumeration 'PostgresPollingStatusType'
PostgresPollingStatusType = c_int # enum

# values for enumeration 'ExecStatusType'
ExecStatusType = c_int # enum

# values for enumeration 'PGTransactionStatusType'
PGTransactionStatusType = c_int # enum

# values for enumeration 'PGVerbosity'
PGVerbosity = c_int # enum
class pg_conn(Structure):
    pass
PGconn = pg_conn
pg_conn._fields_ = [
]
class pg_result(Structure):
    pass
PGresult = pg_result
pg_result._fields_ = [
]
class pg_cancel(Structure):
    pass
pg_cancel._fields_ = [
]
PGcancel = pg_cancel
class pgNotify(Structure):
    pass
pgNotify._fields_ = [
    ('relname', STRING),
    ('be_pid', c_int),
    ('extra', STRING),
    ('next', POINTER(pgNotify)),
]
PGnotify = pgNotify
PQnoticeReceiver = CFUNCTYPE(None, c_void_p, POINTER(PGresult))
PQnoticeProcessor = CFUNCTYPE(None, c_void_p, STRING)
pqbool = c_char
class _PQprintOpt(Structure):
    pass
_PQprintOpt._fields_ = [
    ('header', pqbool),
    ('align', pqbool),
    ('standard', pqbool),
    ('html3', pqbool),
    ('expanded', pqbool),
    ('pager', pqbool),
    ('fieldSep', STRING),
    ('tableOpt', STRING),
    ('caption', STRING),
    ('fieldName', POINTER(STRING)),
]
PQprintOpt = _PQprintOpt
class _PQconninfoOption(Structure):
    pass
_PQconninfoOption._fields_ = [
    ('keyword', STRING),
    ('envvar', STRING),
    ('compiled', STRING),
    ('val', STRING),
    ('label', STRING),
    ('dispchar', STRING),
    ('dispsize', c_int),
]
PQconninfoOption = _PQconninfoOption
class N10PQArgBlock3DOLLAR_7E(Union):
    pass
N10PQArgBlock3DOLLAR_7E._fields_ = [
    ('ptr', POINTER(c_int)),
    ('integer', c_int),
]
class PQArgBlock(Structure):
    pass
PQArgBlock._fields_ = [
    ('len', c_int),
    ('isint', c_int),
    ('u', N10PQArgBlock3DOLLAR_7E),
]
PQconnectStart = _libraries['libpq.dll'].PQconnectStart
PQconnectStart.restype = POINTER(PGconn)
PQconnectStart.argtypes = [STRING]
PQconnectPoll = _libraries['libpq.dll'].PQconnectPoll
PQconnectPoll.restype = PostgresPollingStatusType
PQconnectPoll.argtypes = [POINTER(PGconn)]
PQconnectdb = _libraries['libpq.dll'].PQconnectdb
PQconnectdb.restype = POINTER(PGconn)
PQconnectdb.argtypes = [STRING]
PQsetdbLogin = _libraries['libpq.dll'].PQsetdbLogin
PQsetdbLogin.restype = POINTER(PGconn)
PQsetdbLogin.argtypes = [STRING, STRING, STRING, STRING, STRING, STRING, STRING]
PQfinish = _libraries['libpq.dll'].PQfinish
PQfinish.restype = None
PQfinish.argtypes = [POINTER(PGconn)]
PQconndefaults = _libraries['libpq.dll'].PQconndefaults
PQconndefaults.restype = POINTER(PQconninfoOption)
PQconndefaults.argtypes = []
PQconninfoFree = _libraries['libpq.dll'].PQconninfoFree
PQconninfoFree.restype = None
PQconninfoFree.argtypes = [POINTER(PQconninfoOption)]
PQresetStart = _libraries['libpq.dll'].PQresetStart
PQresetStart.restype = c_int
PQresetStart.argtypes = [POINTER(PGconn)]
PQresetPoll = _libraries['libpq.dll'].PQresetPoll
PQresetPoll.restype = PostgresPollingStatusType
PQresetPoll.argtypes = [POINTER(PGconn)]
PQreset = _libraries['libpq.dll'].PQreset
PQreset.restype = None
PQreset.argtypes = [POINTER(PGconn)]
PQgetCancel = _libraries['libpq.dll'].PQgetCancel
PQgetCancel.restype = POINTER(PGcancel)
PQgetCancel.argtypes = [POINTER(PGconn)]
PQfreeCancel = _libraries['libpq.dll'].PQfreeCancel
PQfreeCancel.restype = None
PQfreeCancel.argtypes = [POINTER(PGcancel)]
PQcancel = _libraries['libpq.dll'].PQcancel
PQcancel.restype = c_int
PQcancel.argtypes = [POINTER(PGcancel), STRING, c_int]
PQrequestCancel = _libraries['libpq.dll'].PQrequestCancel
PQrequestCancel.restype = c_int
PQrequestCancel.argtypes = [POINTER(PGconn)]
PQdb = _libraries['libpq.dll'].PQdb
PQdb.restype = STRING
PQdb.argtypes = [POINTER(PGconn)]
PQuser = _libraries['libpq.dll'].PQuser
PQuser.restype = STRING
PQuser.argtypes = [POINTER(PGconn)]
PQpass = _libraries['libpq.dll'].PQpass
PQpass.restype = STRING
PQpass.argtypes = [POINTER(PGconn)]
PQhost = _libraries['libpq.dll'].PQhost
PQhost.restype = STRING
PQhost.argtypes = [POINTER(PGconn)]
PQport = _libraries['libpq.dll'].PQport
PQport.restype = STRING
PQport.argtypes = [POINTER(PGconn)]
PQtty = _libraries['libpq.dll'].PQtty
PQtty.restype = STRING
PQtty.argtypes = [POINTER(PGconn)]
PQoptions = _libraries['libpq.dll'].PQoptions
PQoptions.restype = STRING
PQoptions.argtypes = [POINTER(PGconn)]
PQstatus = _libraries['libpq.dll'].PQstatus
PQstatus.restype = ConnStatusType
PQstatus.argtypes = [POINTER(PGconn)]
PQtransactionStatus = _libraries['libpq.dll'].PQtransactionStatus
PQtransactionStatus.restype = PGTransactionStatusType
PQtransactionStatus.argtypes = [POINTER(PGconn)]
PQparameterStatus = _libraries['libpq.dll'].PQparameterStatus
PQparameterStatus.restype = STRING
PQparameterStatus.argtypes = [POINTER(PGconn), STRING]
PQprotocolVersion = _libraries['libpq.dll'].PQprotocolVersion
PQprotocolVersion.restype = c_int
PQprotocolVersion.argtypes = [POINTER(PGconn)]
PQserverVersion = _libraries['libpq.dll'].PQserverVersion
PQserverVersion.restype = c_int
PQserverVersion.argtypes = [POINTER(PGconn)]
PQerrorMessage = _libraries['libpq.dll'].PQerrorMessage
PQerrorMessage.restype = STRING
PQerrorMessage.argtypes = [POINTER(PGconn)]
PQsocket = _libraries['libpq.dll'].PQsocket
PQsocket.restype = c_int
PQsocket.argtypes = [POINTER(PGconn)]
PQbackendPID = _libraries['libpq.dll'].PQbackendPID
PQbackendPID.restype = c_int
PQbackendPID.argtypes = [POINTER(PGconn)]
PQconnectionNeedsPassword = _libraries['libpq.dll'].PQconnectionNeedsPassword
PQconnectionNeedsPassword.restype = c_int
PQconnectionNeedsPassword.argtypes = [POINTER(PGconn)]
PQconnectionUsedPassword = _libraries['libpq.dll'].PQconnectionUsedPassword
PQconnectionUsedPassword.restype = c_int
PQconnectionUsedPassword.argtypes = [POINTER(PGconn)]
PQclientEncoding = _libraries['libpq.dll'].PQclientEncoding
PQclientEncoding.restype = c_int
PQclientEncoding.argtypes = [POINTER(PGconn)]
PQsetClientEncoding = _libraries['libpq.dll'].PQsetClientEncoding
PQsetClientEncoding.restype = c_int
PQsetClientEncoding.argtypes = [POINTER(PGconn), STRING]
PQgetssl = _libraries['libpq.dll'].PQgetssl
PQgetssl.restype = c_void_p
PQgetssl.argtypes = [POINTER(PGconn)]
PQinitSSL = _libraries['libpq.dll'].PQinitSSL
PQinitSSL.restype = None
PQinitSSL.argtypes = [c_int]
PQsetErrorVerbosity = _libraries['libpq.dll'].PQsetErrorVerbosity
PQsetErrorVerbosity.restype = PGVerbosity
PQsetErrorVerbosity.argtypes = [POINTER(PGconn), PGVerbosity]
PQtrace = _libraries['libpq.dll'].PQtrace
PQtrace.restype = None
PQtrace.argtypes = [POINTER(PGconn), POINTER(FILE)]
PQuntrace = _libraries['libpq.dll'].PQuntrace
PQuntrace.restype = None
PQuntrace.argtypes = [POINTER(PGconn)]
PQsetNoticeReceiver = _libraries['libpq.dll'].PQsetNoticeReceiver
PQsetNoticeReceiver.restype = PQnoticeReceiver
PQsetNoticeReceiver.argtypes = [POINTER(PGconn), PQnoticeReceiver, c_void_p]
PQsetNoticeProcessor = _libraries['libpq.dll'].PQsetNoticeProcessor
PQsetNoticeProcessor.restype = PQnoticeProcessor
PQsetNoticeProcessor.argtypes = [POINTER(PGconn), PQnoticeProcessor, c_void_p]
pgthreadlock_t = CFUNCTYPE(None, c_int)
PQregisterThreadLock = _libraries['libpq.dll'].PQregisterThreadLock
PQregisterThreadLock.restype = pgthreadlock_t
PQregisterThreadLock.argtypes = [pgthreadlock_t]
PQexec = _libraries['libpq.dll'].PQexec
PQexec.restype = POINTER(PGresult)
PQexec.argtypes = [POINTER(PGconn), STRING]
Oid = c_uint
PQexecParams = _libraries['libpq.dll'].PQexecParams
PQexecParams.restype = POINTER(PGresult)
PQexecParams.argtypes = [POINTER(PGconn), STRING, c_int, POINTER(Oid), POINTER(STRING), POINTER(c_int), POINTER(c_int), c_int]
PQprepare = _libraries['libpq.dll'].PQprepare
PQprepare.restype = POINTER(PGresult)
PQprepare.argtypes = [POINTER(PGconn), STRING, STRING, c_int, POINTER(Oid)]
PQexecPrepared = _libraries['libpq.dll'].PQexecPrepared
PQexecPrepared.restype = POINTER(PGresult)
PQexecPrepared.argtypes = [POINTER(PGconn), STRING, c_int, POINTER(STRING), POINTER(c_int), POINTER(c_int), c_int]
PQsendQuery = _libraries['libpq.dll'].PQsendQuery
PQsendQuery.restype = c_int
PQsendQuery.argtypes = [POINTER(PGconn), STRING]
PQsendQueryParams = _libraries['libpq.dll'].PQsendQueryParams
PQsendQueryParams.restype = c_int
PQsendQueryParams.argtypes = [POINTER(PGconn), STRING, c_int, POINTER(Oid), POINTER(STRING), POINTER(c_int), POINTER(c_int), c_int]
PQsendPrepare = _libraries['libpq.dll'].PQsendPrepare
PQsendPrepare.restype = c_int
PQsendPrepare.argtypes = [POINTER(PGconn), STRING, STRING, c_int, POINTER(Oid)]
PQsendQueryPrepared = _libraries['libpq.dll'].PQsendQueryPrepared
PQsendQueryPrepared.restype = c_int
PQsendQueryPrepared.argtypes = [POINTER(PGconn), STRING, c_int, POINTER(STRING), POINTER(c_int), POINTER(c_int), c_int]
PQgetResult = _libraries['libpq.dll'].PQgetResult
PQgetResult.restype = POINTER(PGresult)
PQgetResult.argtypes = [POINTER(PGconn)]
PQisBusy = _libraries['libpq.dll'].PQisBusy
PQisBusy.restype = c_int
PQisBusy.argtypes = [POINTER(PGconn)]
PQconsumeInput = _libraries['libpq.dll'].PQconsumeInput
PQconsumeInput.restype = c_int
PQconsumeInput.argtypes = [POINTER(PGconn)]
PQnotifies = _libraries['libpq.dll'].PQnotifies
PQnotifies.restype = POINTER(PGnotify)
PQnotifies.argtypes = [POINTER(PGconn)]
PQputCopyData = _libraries['libpq.dll'].PQputCopyData
PQputCopyData.restype = c_int
PQputCopyData.argtypes = [POINTER(PGconn), STRING, c_int]
PQputCopyEnd = _libraries['libpq.dll'].PQputCopyEnd
PQputCopyEnd.restype = c_int
PQputCopyEnd.argtypes = [POINTER(PGconn), STRING]
PQgetCopyData = _libraries['libpq.dll'].PQgetCopyData
PQgetCopyData.restype = c_int
PQgetCopyData.argtypes = [POINTER(PGconn), POINTER(STRING), c_int]
PQgetline = _libraries['libpq.dll'].PQgetline
PQgetline.restype = c_int
PQgetline.argtypes = [POINTER(PGconn), STRING, c_int]
PQputline = _libraries['libpq.dll'].PQputline
PQputline.restype = c_int
PQputline.argtypes = [POINTER(PGconn), STRING]
PQgetlineAsync = _libraries['libpq.dll'].PQgetlineAsync
PQgetlineAsync.restype = c_int
PQgetlineAsync.argtypes = [POINTER(PGconn), STRING, c_int]
PQputnbytes = _libraries['libpq.dll'].PQputnbytes
PQputnbytes.restype = c_int
PQputnbytes.argtypes = [POINTER(PGconn), STRING, c_int]
PQendcopy = _libraries['libpq.dll'].PQendcopy
PQendcopy.restype = c_int
PQendcopy.argtypes = [POINTER(PGconn)]
PQsetnonblocking = _libraries['libpq.dll'].PQsetnonblocking
PQsetnonblocking.restype = c_int
PQsetnonblocking.argtypes = [POINTER(PGconn), c_int]
PQisnonblocking = _libraries['libpq.dll'].PQisnonblocking
PQisnonblocking.restype = c_int
PQisnonblocking.argtypes = [POINTER(PGconn)]
PQisthreadsafe = _libraries['libpq.dll'].PQisthreadsafe
PQisthreadsafe.restype = c_int
PQisthreadsafe.argtypes = []
PQflush = _libraries['libpq.dll'].PQflush
PQflush.restype = c_int
PQflush.argtypes = [POINTER(PGconn)]
PQfn = _libraries['libpq.dll'].PQfn
PQfn.restype = POINTER(PGresult)
PQfn.argtypes = [POINTER(PGconn), c_int, POINTER(c_int), POINTER(c_int), c_int, POINTER(PQArgBlock), c_int]
PQresultStatus = _libraries['libpq.dll'].PQresultStatus
PQresultStatus.restype = ExecStatusType
PQresultStatus.argtypes = [POINTER(PGresult)]
PQresStatus = _libraries['libpq.dll'].PQresStatus
PQresStatus.restype = STRING
PQresStatus.argtypes = [ExecStatusType]
PQresultErrorMessage = _libraries['libpq.dll'].PQresultErrorMessage
PQresultErrorMessage.restype = STRING
PQresultErrorMessage.argtypes = [POINTER(PGresult)]
PQresultErrorField = _libraries['libpq.dll'].PQresultErrorField
PQresultErrorField.restype = STRING
PQresultErrorField.argtypes = [POINTER(PGresult), c_int]
PQntuples = _libraries['libpq.dll'].PQntuples
PQntuples.restype = c_int
PQntuples.argtypes = [POINTER(PGresult)]
PQnfields = _libraries['libpq.dll'].PQnfields
PQnfields.restype = c_int
PQnfields.argtypes = [POINTER(PGresult)]
PQbinaryTuples = _libraries['libpq.dll'].PQbinaryTuples
PQbinaryTuples.restype = c_int
PQbinaryTuples.argtypes = [POINTER(PGresult)]
PQfname = _libraries['libpq.dll'].PQfname
PQfname.restype = STRING
PQfname.argtypes = [POINTER(PGresult), c_int]
PQfnumber = _libraries['libpq.dll'].PQfnumber
PQfnumber.restype = c_int
PQfnumber.argtypes = [POINTER(PGresult), STRING]
PQftable = _libraries['libpq.dll'].PQftable
PQftable.restype = Oid
PQftable.argtypes = [POINTER(PGresult), c_int]
PQftablecol = _libraries['libpq.dll'].PQftablecol
PQftablecol.restype = c_int
PQftablecol.argtypes = [POINTER(PGresult), c_int]
PQfformat = _libraries['libpq.dll'].PQfformat
PQfformat.restype = c_int
PQfformat.argtypes = [POINTER(PGresult), c_int]
PQftype = _libraries['libpq.dll'].PQftype
PQftype.restype = Oid
PQftype.argtypes = [POINTER(PGresult), c_int]
PQfsize = _libraries['libpq.dll'].PQfsize
PQfsize.restype = c_int
PQfsize.argtypes = [POINTER(PGresult), c_int]
PQfmod = _libraries['libpq.dll'].PQfmod
PQfmod.restype = c_int
PQfmod.argtypes = [POINTER(PGresult), c_int]
PQcmdStatus = _libraries['libpq.dll'].PQcmdStatus
PQcmdStatus.restype = STRING
PQcmdStatus.argtypes = [POINTER(PGresult)]
PQoidStatus = _libraries['libpq.dll'].PQoidStatus
PQoidStatus.restype = STRING
PQoidStatus.argtypes = [POINTER(PGresult)]
PQoidValue = _libraries['libpq.dll'].PQoidValue
PQoidValue.restype = Oid
PQoidValue.argtypes = [POINTER(PGresult)]
PQcmdTuples = _libraries['libpq.dll'].PQcmdTuples
PQcmdTuples.restype = STRING
PQcmdTuples.argtypes = [POINTER(PGresult)]
PQgetvalue = _libraries['libpq.dll'].PQgetvalue
PQgetvalue.restype = STRING
PQgetvalue.argtypes = [POINTER(PGresult), c_int, c_int]
PQgetlength = _libraries['libpq.dll'].PQgetlength
PQgetlength.restype = c_int
PQgetlength.argtypes = [POINTER(PGresult), c_int, c_int]
PQgetisnull = _libraries['libpq.dll'].PQgetisnull
PQgetisnull.restype = c_int
PQgetisnull.argtypes = [POINTER(PGresult), c_int, c_int]
PQnparams = _libraries['libpq.dll'].PQnparams
PQnparams.restype = c_int
PQnparams.argtypes = [POINTER(PGresult)]
PQparamtype = _libraries['libpq.dll'].PQparamtype
PQparamtype.restype = Oid
PQparamtype.argtypes = [POINTER(PGresult), c_int]
PQdescribePrepared = _libraries['libpq.dll'].PQdescribePrepared
PQdescribePrepared.restype = POINTER(PGresult)
PQdescribePrepared.argtypes = [POINTER(PGconn), STRING]
PQdescribePortal = _libraries['libpq.dll'].PQdescribePortal
PQdescribePortal.restype = POINTER(PGresult)
PQdescribePortal.argtypes = [POINTER(PGconn), STRING]
PQsendDescribePrepared = _libraries['libpq.dll'].PQsendDescribePrepared
PQsendDescribePrepared.restype = c_int
PQsendDescribePrepared.argtypes = [POINTER(PGconn), STRING]
PQsendDescribePortal = _libraries['libpq.dll'].PQsendDescribePortal
PQsendDescribePortal.restype = c_int
PQsendDescribePortal.argtypes = [POINTER(PGconn), STRING]
PQclear = _libraries['libpq.dll'].PQclear
PQclear.restype = None
PQclear.argtypes = [POINTER(PGresult)]
PQfreemem = _libraries['libpq.dll'].PQfreemem
PQfreemem.restype = None
PQfreemem.argtypes = [c_void_p]
PQmakeEmptyPGresult = _libraries['libpq.dll'].PQmakeEmptyPGresult
PQmakeEmptyPGresult.restype = POINTER(PGresult)
PQmakeEmptyPGresult.argtypes = [POINTER(PGconn), ExecStatusType]
PQescapeStringConn = _libraries['libpq.dll'].PQescapeStringConn
PQescapeStringConn.restype = size_t
PQescapeStringConn.argtypes = [POINTER(PGconn), STRING, STRING, size_t, POINTER(c_int)]
PQescapeByteaConn = _libraries['libpq.dll'].PQescapeByteaConn
PQescapeByteaConn.restype = POINTER(c_ubyte)
PQescapeByteaConn.argtypes = [POINTER(PGconn), POINTER(c_ubyte), size_t, POINTER(size_t)]
PQunescapeBytea = _libraries['libpq.dll'].PQunescapeBytea
PQunescapeBytea.restype = POINTER(c_ubyte)
PQunescapeBytea.argtypes = [POINTER(c_ubyte), POINTER(size_t)]
PQescapeString = _libraries['libpq.dll'].PQescapeString
PQescapeString.restype = size_t
PQescapeString.argtypes = [STRING, STRING, size_t]
PQescapeBytea = _libraries['libpq.dll'].PQescapeBytea
PQescapeBytea.restype = POINTER(c_ubyte)
PQescapeBytea.argtypes = [POINTER(c_ubyte), size_t, POINTER(size_t)]
PQprint = _libraries['libpq.dll'].PQprint
PQprint.restype = None
PQprint.argtypes = [POINTER(FILE), POINTER(PGresult), POINTER(PQprintOpt)]
PQdisplayTuples = _libraries['libpq.dll'].PQdisplayTuples
PQdisplayTuples.restype = None
PQdisplayTuples.argtypes = [POINTER(PGresult), POINTER(FILE), c_int, STRING, c_int, c_int]
PQprintTuples = _libraries['libpq.dll'].PQprintTuples
PQprintTuples.restype = None
PQprintTuples.argtypes = [POINTER(PGresult), POINTER(FILE), c_int, c_int, c_int]
lo_open = _libraries['libpq.dll'].lo_open
lo_open.restype = c_int
lo_open.argtypes = [POINTER(PGconn), Oid, c_int]
lo_close = _libraries['libpq.dll'].lo_close
lo_close.restype = c_int
lo_close.argtypes = [POINTER(PGconn), c_int]
lo_read = _libraries['libpq.dll'].lo_read
lo_read.restype = c_int
lo_read.argtypes = [POINTER(PGconn), c_int, STRING, size_t]
lo_write = _libraries['libpq.dll'].lo_write
lo_write.restype = c_int
lo_write.argtypes = [POINTER(PGconn), c_int, STRING, size_t]
lo_lseek = _libraries['libpq.dll'].lo_lseek
lo_lseek.restype = c_int
lo_lseek.argtypes = [POINTER(PGconn), c_int, c_int, c_int]
lo_creat = _libraries['libpq.dll'].lo_creat
lo_creat.restype = Oid
lo_creat.argtypes = [POINTER(PGconn), c_int]
lo_create = _libraries['libpq.dll'].lo_create
lo_create.restype = Oid
lo_create.argtypes = [POINTER(PGconn), Oid]
lo_tell = _libraries['libpq.dll'].lo_tell
lo_tell.restype = c_int
lo_tell.argtypes = [POINTER(PGconn), c_int]
lo_truncate = _libraries['libpq.dll'].lo_truncate
lo_truncate.restype = c_int
lo_truncate.argtypes = [POINTER(PGconn), c_int, size_t]
lo_unlink = _libraries['libpq.dll'].lo_unlink
lo_unlink.restype = c_int
lo_unlink.argtypes = [POINTER(PGconn), Oid]
lo_import = _libraries['libpq.dll'].lo_import
lo_import.restype = Oid
lo_import.argtypes = [POINTER(PGconn), STRING]
lo_export = _libraries['libpq.dll'].lo_export
lo_export.restype = c_int
lo_export.argtypes = [POINTER(PGconn), Oid, STRING]
PQmblen = _libraries['libpq.dll'].PQmblen
PQmblen.restype = c_int
PQmblen.argtypes = [STRING, c_int]
PQdsplen = _libraries['libpq.dll'].PQdsplen
PQdsplen.restype = c_int
PQdsplen.argtypes = [STRING, c_int]
PQenv2encoding = _libraries['libpq.dll'].PQenv2encoding
PQenv2encoding.restype = c_int
PQenv2encoding.argtypes = []
PQencryptPassword = _libraries['libpq.dll'].PQencryptPassword
PQencryptPassword.restype = STRING
PQencryptPassword.argtypes = [STRING, STRING]
pg_char_to_encoding = _libraries['libpq.dll'].pg_char_to_encoding
pg_char_to_encoding.restype = c_int
pg_char_to_encoding.argtypes = [STRING]
pg_encoding_to_char = _libraries['libpq.dll'].pg_encoding_to_char
pg_encoding_to_char.restype = STRING
pg_encoding_to_char.argtypes = [c_int]
pg_valid_server_encoding_id = _libraries['libpq.dll'].pg_valid_server_encoding_id
pg_valid_server_encoding_id.restype = c_int
pg_valid_server_encoding_id.argtypes = [c_int]
__all__ = ['PQnfields', 'PQdescribePortal', 'CONNECTION_MADE',
           'PQgetvalue', 'PQresStatus', 'threadlocinfo',
           'PQresultStatus', 'FILE', 'PQclear', 'size_t',
           'PGRES_FATAL_ERROR', 'PQgetssl', 'PQport', 'fpos_t',
           'rsize_t', '_iobuf', 'PQtty', 'PQfreeCancel',
           'CONNECTION_SETENV', 'PQescapeString', 'tagLC_ID',
           'PQresultErrorMessage', 'PQstatus', '_locale_tstruct',
           'intptr_t', 'lo_lseek', 'lo_open', 'PQencryptPassword',
           'PQserverVersion', 'PQsetNoticeProcessor', 'PQescapeBytea',
           '_PQprintOpt', 'lo_truncate', 'PQsendPrepare',
           'PQsetNoticeReceiver', 'PQsetnonblocking', 'PQfsize',
           'PQfformat', 'LC_ID', 'PQfn', 'PGRES_TUPLES_OK',
           '__time32_t', 'PQputCopyEnd', 'PQdescribePrepared',
           'pgNotify', 'PQgetlength', 'PQTRANS_INTRANS', 'lo_tell',
           'PQconnectStart', 'PGRES_EMPTY_QUERY', 'lo_unlink',
           'pgthreadlock_t', 'PGRES_POLLING_FAILED',
           'PQERRORS_DEFAULT', 'PQregisterThreadLock', 'PQftablecol',
           'PQprintTuples', 'PQERRORS_VERBOSE', 'lo_read',
           'PQsendQueryParams', 'PGVerbosity', 'PQuntrace',
           'PQTRANS_ACTIVE', 'PQreset', 'LPLC_ID', 'PQrequestCancel',
           'PQparamtype', 'PQoidValue', 'lo_write', 'PQgetline',
           'PGconn', 'PQputline', 'pqbool', 'PQfinish',
           'PQexecPrepared', 'localeinfo_struct', 'PQgetlineAsync',
           'PQsetClientEncoding', 'pg_char_to_encoding', 'va_list',
           'PQsocket', 'PQconnectdb', 'PQTRANS_UNKNOWN',
           'threadlocaleinfostruct', 'PQpass',
           'PostgresPollingStatusType', 'PQsendDescribePrepared',
           'PQprotocolVersion', 'PQsendQueryPrepared', 'PQresetPoll',
           'PQhost', 'PGRES_COPY_IN', 'PQflush', 'pthreadlocinfo',
           'CONNECTION_AWAITING_RESPONSE', 'PQfname', 'PQprint',
           'PQputnbytes', 'PQputCopyData', 'errcode', 'PQinitSSL',
           'PQconndefaults', 'PQexec', 'ptrdiff_t', 'PQunescapeBytea',
           'PGcancel', 'pg_cancel', 'pthreadmbcinfo', '__time64_t',
           'PQescapeByteaConn', 'PQmblen', 'wint_t',
           'PGRES_POLLING_READING', 'PQcmdTuples', 'PQconnectPoll',
           'PQclientEncoding', 'CONNECTION_NEEDED', 'PQgetResult',
           'errno_t', 'lo_import', 'PQconnectionNeedsPassword',
           'PQnparams', 'PQsetErrorVerbosity', 'PGRES_POLLING_OK',
           'PGTransactionStatusType', 'PGRES_COPY_OUT',
           '_PQconninfoOption', 'CONNECTION_OK', 'PQconninfoOption',
           'lo_creat', 'PQnoticeProcessor', 'uintptr_t', 'pg_result',
           'PQntuples', 'PQescapeStringConn', 'PQnotifies',
           'PQnoticeReceiver', 'PGnotify',
           'N22threadlocaleinfostruct3DOLLAR_0E', '__lc_time_data',
           'PGresult', 'PQconnectionUsedPassword', 'PQcancel',
           'PQbinaryTuples', 'PQendcopy', 'PQenv2encoding',
           'PQgetCancel', '_locale_t', 'ExecStatusType',
           'CONNECTION_AUTH_OK', 'pg_valid_server_encoding_id',
           'PQgetisnull', 'PGRES_POLLING_WRITING',
           'PQresultErrorField', 'PQuser', 'PQtransactionStatus',
           'PQsetdbLogin', 'PGRES_COMMAND_OK', 'PQERRORS_TERSE',
           'PQcmdStatus', 'CONNECTION_BAD', 'PQconninfoFree',
           'PQArgBlock', 'PQftype', 'PQparameterStatus', 'time_t',
           'pg_encoding_to_char', 'PQisBusy', 'CONNECTION_STARTED',
           'PQTRANS_INERROR', 'Oid', 'PQfnumber', 'PQoidStatus',
           'PGRES_NONFATAL_ERROR', 'lo_export', 'PQresetStart',
           'PQdb', 'PQconsumeInput', 'PQbackendPID', 'PQprintOpt',
           'PQerrorMessage', 'PQsendDescribePortal',
           'PQdisplayTuples', 'PQprepare', 'N10PQArgBlock3DOLLAR_7E',
           'PQisnonblocking', 'PQfreemem', 'lo_create', 'pg_conn',
           'PQgetCopyData', 'lconv', 'ConnStatusType', 'PQexecParams',
           'CONNECTION_SSL_STARTUP', 'PQftable',
           'PGRES_POLLING_ACTIVE', 'lo_close', 'PGRES_BAD_RESPONSE',
           'wctype_t', 'PQtrace', 'threadmbcinfostruct', 'PQoptions',
           'PQmakeEmptyPGresult', 'PQisthreadsafe', 'PQdsplen',
           'PQfmod', 'PQTRANS_IDLE', 'PQsendQuery']
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.