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
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]
#[repr(C)]
pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
impl <T> __BindgenUnionField<T> {
#[inline]
pub fn new() -> Self { __BindgenUnionField(::std::marker::PhantomData) }
#[inline]
pub unsafe fn as_ref(&self) -> &T { ::std::mem::transmute(self) }
#[inline]
pub unsafe fn as_mut(&mut self) -> &mut T { ::std::mem::transmute(self) }
}
impl <T> ::std::default::Default for __BindgenUnionField<T> {
#[inline]
fn default() -> Self { Self::new() }
}
impl <T> ::std::clone::Clone for __BindgenUnionField<T> {
#[inline]
fn clone(&self) -> Self { Self::new() }
}
impl <T> ::std::marker::Copy for __BindgenUnionField<T> { }
impl <T> ::std::fmt::Debug for __BindgenUnionField<T> {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
fmt.write_str("__BindgenUnionField")
}
}
pub type __int64_t = ::std::os::raw::c_longlong;
pub type __darwin_size_t = ::std::os::raw::c_ulong;
pub type __darwin_off_t = __int64_t;
pub type fpos_t = __darwin_off_t;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct __sbuf {
pub _base: *mut ::std::os::raw::c_uchar,
pub _size: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout___sbuf() {
assert_eq!(::std::mem::size_of::<__sbuf>() , 16usize);
assert_eq!(::std::mem::align_of::<__sbuf>() , 8usize);
}
impl Clone for __sbuf {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sFILEX([u8; 0]);
#[repr(C)]
#[derive(Debug, Copy)]
pub struct __sFILE {
pub _p: *mut ::std::os::raw::c_uchar,
pub _r: ::std::os::raw::c_int,
pub _w: ::std::os::raw::c_int,
pub _flags: ::std::os::raw::c_short,
pub _file: ::std::os::raw::c_short,
pub _bf: __sbuf,
pub _lbfsize: ::std::os::raw::c_int,
pub _cookie: *mut ::std::os::raw::c_void,
pub _close: ::std::option::Option<unsafe extern "C" fn(arg1:
*mut ::std::os::raw::c_void)
-> ::std::os::raw::c_int>,
pub _read: ::std::option::Option<unsafe extern "C" fn(arg1:
*mut ::std::os::raw::c_void,
arg2:
*mut ::std::os::raw::c_char,
arg3:
::std::os::raw::c_int)
-> ::std::os::raw::c_int>,
pub _seek: ::std::option::Option<unsafe extern "C" fn(arg1:
*mut ::std::os::raw::c_void,
arg2: fpos_t,
arg3:
::std::os::raw::c_int)
-> ::std::os::raw::c_longlong>,
pub _write: ::std::option::Option<unsafe extern "C" fn(arg1:
*mut ::std::os::raw::c_void,
arg2:
*const ::std::os::raw::c_char,
arg3:
::std::os::raw::c_int)
-> ::std::os::raw::c_int>,
pub _ub: __sbuf,
pub _extra: *mut __sFILEX,
pub _ur: ::std::os::raw::c_int,
pub _ubuf: [::std::os::raw::c_uchar; 3usize],
pub _nbuf: [::std::os::raw::c_uchar; 1usize],
pub _lb: __sbuf,
pub _blksize: ::std::os::raw::c_int,
pub _offset: fpos_t,
}
#[test]
fn bindgen_test_layout___sFILE() {
assert_eq!(::std::mem::size_of::<__sFILE>() , 152usize);
assert_eq!(::std::mem::align_of::<__sFILE>() , 8usize);
}
impl Clone for __sFILE {
fn clone(&self) -> Self { *self }
}
pub type FILE = __sFILE;
pub type Oid = ::std::os::raw::c_uint;
pub const CONNECTION_OK: _bindgen_ty_2 = _bindgen_ty_2::CONNECTION_OK;
pub const CONNECTION_BAD: _bindgen_ty_2 = _bindgen_ty_2::CONNECTION_BAD;
pub const CONNECTION_STARTED: _bindgen_ty_2 =
_bindgen_ty_2::CONNECTION_STARTED;
pub const CONNECTION_MADE: _bindgen_ty_2 = _bindgen_ty_2::CONNECTION_MADE;
pub const CONNECTION_AWAITING_RESPONSE: _bindgen_ty_2 =
_bindgen_ty_2::CONNECTION_AWAITING_RESPONSE;
pub const CONNECTION_AUTH_OK: _bindgen_ty_2 =
_bindgen_ty_2::CONNECTION_AUTH_OK;
pub const CONNECTION_SETENV: _bindgen_ty_2 = _bindgen_ty_2::CONNECTION_SETENV;
pub const CONNECTION_SSL_STARTUP: _bindgen_ty_2 =
_bindgen_ty_2::CONNECTION_SSL_STARTUP;
pub const CONNECTION_NEEDED: _bindgen_ty_2 = _bindgen_ty_2::CONNECTION_NEEDED;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum _bindgen_ty_2 {
CONNECTION_OK = 0,
CONNECTION_BAD = 1,
CONNECTION_STARTED = 2,
CONNECTION_MADE = 3,
CONNECTION_AWAITING_RESPONSE = 4,
CONNECTION_AUTH_OK = 5,
CONNECTION_SETENV = 6,
CONNECTION_SSL_STARTUP = 7,
CONNECTION_NEEDED = 8,
}
pub use self::_bindgen_ty_2 as ConnStatusType;
pub const PGRES_POLLING_FAILED: _bindgen_ty_3 =
_bindgen_ty_3::PGRES_POLLING_FAILED;
pub const PGRES_POLLING_READING: _bindgen_ty_3 =
_bindgen_ty_3::PGRES_POLLING_READING;
pub const PGRES_POLLING_WRITING: _bindgen_ty_3 =
_bindgen_ty_3::PGRES_POLLING_WRITING;
pub const PGRES_POLLING_OK: _bindgen_ty_3 = _bindgen_ty_3::PGRES_POLLING_OK;
pub const PGRES_POLLING_ACTIVE: _bindgen_ty_3 =
_bindgen_ty_3::PGRES_POLLING_ACTIVE;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum _bindgen_ty_3 {
PGRES_POLLING_FAILED = 0,
PGRES_POLLING_READING = 1,
PGRES_POLLING_WRITING = 2,
PGRES_POLLING_OK = 3,
PGRES_POLLING_ACTIVE = 4,
}
pub use self::_bindgen_ty_3 as PostgresPollingStatusType;
pub const PGRES_EMPTY_QUERY: _bindgen_ty_4 = _bindgen_ty_4::PGRES_EMPTY_QUERY;
pub const PGRES_COMMAND_OK: _bindgen_ty_4 = _bindgen_ty_4::PGRES_COMMAND_OK;
pub const PGRES_TUPLES_OK: _bindgen_ty_4 = _bindgen_ty_4::PGRES_TUPLES_OK;
pub const PGRES_COPY_OUT: _bindgen_ty_4 = _bindgen_ty_4::PGRES_COPY_OUT;
pub const PGRES_COPY_IN: _bindgen_ty_4 = _bindgen_ty_4::PGRES_COPY_IN;
pub const PGRES_BAD_RESPONSE: _bindgen_ty_4 =
_bindgen_ty_4::PGRES_BAD_RESPONSE;
pub const PGRES_NONFATAL_ERROR: _bindgen_ty_4 =
_bindgen_ty_4::PGRES_NONFATAL_ERROR;
pub const PGRES_FATAL_ERROR: _bindgen_ty_4 = _bindgen_ty_4::PGRES_FATAL_ERROR;
pub const PGRES_COPY_BOTH: _bindgen_ty_4 = _bindgen_ty_4::PGRES_COPY_BOTH;
pub const PGRES_SINGLE_TUPLE: _bindgen_ty_4 =
_bindgen_ty_4::PGRES_SINGLE_TUPLE;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum _bindgen_ty_4 {
PGRES_EMPTY_QUERY = 0,
PGRES_COMMAND_OK = 1,
PGRES_TUPLES_OK = 2,
PGRES_COPY_OUT = 3,
PGRES_COPY_IN = 4,
PGRES_BAD_RESPONSE = 5,
PGRES_NONFATAL_ERROR = 6,
PGRES_FATAL_ERROR = 7,
PGRES_COPY_BOTH = 8,
PGRES_SINGLE_TUPLE = 9,
}
pub use self::_bindgen_ty_4 as ExecStatusType;
pub const PQTRANS_IDLE: _bindgen_ty_5 = _bindgen_ty_5::PQTRANS_IDLE;
pub const PQTRANS_ACTIVE: _bindgen_ty_5 = _bindgen_ty_5::PQTRANS_ACTIVE;
pub const PQTRANS_INTRANS: _bindgen_ty_5 = _bindgen_ty_5::PQTRANS_INTRANS;
pub const PQTRANS_INERROR: _bindgen_ty_5 = _bindgen_ty_5::PQTRANS_INERROR;
pub const PQTRANS_UNKNOWN: _bindgen_ty_5 = _bindgen_ty_5::PQTRANS_UNKNOWN;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum _bindgen_ty_5 {
PQTRANS_IDLE = 0,
PQTRANS_ACTIVE = 1,
PQTRANS_INTRANS = 2,
PQTRANS_INERROR = 3,
PQTRANS_UNKNOWN = 4,
}
pub use self::_bindgen_ty_5 as PGTransactionStatusType;
pub const PQERRORS_TERSE: _bindgen_ty_6 = _bindgen_ty_6::PQERRORS_TERSE;
pub const PQERRORS_DEFAULT: _bindgen_ty_6 = _bindgen_ty_6::PQERRORS_DEFAULT;
pub const PQERRORS_VERBOSE: _bindgen_ty_6 = _bindgen_ty_6::PQERRORS_VERBOSE;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum _bindgen_ty_6 {
PQERRORS_TERSE = 0,
PQERRORS_DEFAULT = 1,
PQERRORS_VERBOSE = 2,
}
pub use self::_bindgen_ty_6 as PGVerbosity;
pub const PQPING_OK: _bindgen_ty_7 = _bindgen_ty_7::PQPING_OK;
pub const PQPING_REJECT: _bindgen_ty_7 = _bindgen_ty_7::PQPING_REJECT;
pub const PQPING_NO_RESPONSE: _bindgen_ty_7 =
_bindgen_ty_7::PQPING_NO_RESPONSE;
pub const PQPING_NO_ATTEMPT: _bindgen_ty_7 = _bindgen_ty_7::PQPING_NO_ATTEMPT;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum _bindgen_ty_7 {
PQPING_OK = 0,
PQPING_REJECT = 1,
PQPING_NO_RESPONSE = 2,
PQPING_NO_ATTEMPT = 3,
}
pub use self::_bindgen_ty_7 as PGPing;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pg_conn([u8; 0]);
pub type PGconn = pg_conn;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pg_result([u8; 0]);
pub type PGresult = pg_result;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pg_cancel([u8; 0]);
pub type PGcancel = pg_cancel;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct pgNotify {
pub relname: *mut ::std::os::raw::c_char,
pub be_pid: ::std::os::raw::c_int,
pub extra: *mut ::std::os::raw::c_char,
pub next: *mut pgNotify,
}
#[test]
fn bindgen_test_layout_pgNotify() {
assert_eq!(::std::mem::size_of::<pgNotify>() , 32usize);
assert_eq!(::std::mem::align_of::<pgNotify>() , 8usize);
}
impl Clone for pgNotify {
fn clone(&self) -> Self { *self }
}
pub type PGnotify = pgNotify;
pub type PQnoticeReceiver =
::std::option::Option<unsafe extern "C" fn(arg:
*mut ::std::os::raw::c_void,
res: *const PGresult)>;
pub type PQnoticeProcessor =
::std::option::Option<unsafe extern "C" fn(arg:
*mut ::std::os::raw::c_void,
message:
*const ::std::os::raw::c_char)>;
pub type pqbool = ::std::os::raw::c_char;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct _PQprintOpt {
pub header: pqbool,
pub align: pqbool,
pub standard: pqbool,
pub html3: pqbool,
pub expanded: pqbool,
pub pager: pqbool,
pub fieldSep: *mut ::std::os::raw::c_char,
pub tableOpt: *mut ::std::os::raw::c_char,
pub caption: *mut ::std::os::raw::c_char,
pub fieldName: *mut *mut ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout__PQprintOpt() {
assert_eq!(::std::mem::size_of::<_PQprintOpt>() , 40usize);
assert_eq!(::std::mem::align_of::<_PQprintOpt>() , 8usize);
}
impl Clone for _PQprintOpt {
fn clone(&self) -> Self { *self }
}
pub type PQprintOpt = _PQprintOpt;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct _PQconninfoOption {
pub keyword: *mut ::std::os::raw::c_char,
pub envvar: *mut ::std::os::raw::c_char,
pub compiled: *mut ::std::os::raw::c_char,
pub val: *mut ::std::os::raw::c_char,
pub label: *mut ::std::os::raw::c_char,
pub dispchar: *mut ::std::os::raw::c_char,
pub dispsize: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout__PQconninfoOption() {
assert_eq!(::std::mem::size_of::<_PQconninfoOption>() , 56usize);
assert_eq!(::std::mem::align_of::<_PQconninfoOption>() , 8usize);
}
impl Clone for _PQconninfoOption {
fn clone(&self) -> Self { *self }
}
pub type PQconninfoOption = _PQconninfoOption;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct _bindgen_ty_8 {
pub len: ::std::os::raw::c_int,
pub isint: ::std::os::raw::c_int,
pub u: _bindgen_ty_8__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct _bindgen_ty_8__bindgen_ty_1 {
pub ptr: __BindgenUnionField<*mut ::std::os::raw::c_int>,
pub integer: __BindgenUnionField<::std::os::raw::c_int>,
pub bindgen_union_field: u64,
}
#[test]
fn bindgen_test_layout__bindgen_ty_8__bindgen_ty_1() {
assert_eq!(::std::mem::size_of::<_bindgen_ty_8__bindgen_ty_1>() , 8usize);
assert_eq!(::std::mem::align_of::<_bindgen_ty_8__bindgen_ty_1>() ,
8usize);
}
impl Clone for _bindgen_ty_8__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout__bindgen_ty_8() {
assert_eq!(::std::mem::size_of::<_bindgen_ty_8>() , 16usize);
assert_eq!(::std::mem::align_of::<_bindgen_ty_8>() , 8usize);
}
impl Clone for _bindgen_ty_8 {
fn clone(&self) -> Self { *self }
}
pub type PQArgBlock = _bindgen_ty_8;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct pgresAttDesc {
pub name: *mut ::std::os::raw::c_char,
pub tableid: Oid,
pub columnid: ::std::os::raw::c_int,
pub format: ::std::os::raw::c_int,
pub typid: Oid,
pub typlen: ::std::os::raw::c_int,
pub atttypmod: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pgresAttDesc() {
assert_eq!(::std::mem::size_of::<pgresAttDesc>() , 32usize);
assert_eq!(::std::mem::align_of::<pgresAttDesc>() , 8usize);
}
impl Clone for pgresAttDesc {
fn clone(&self) -> Self { *self }
}
pub type PGresAttDesc = pgresAttDesc;
extern "C" {
pub fn PQconnectStart(conninfo: *const ::std::os::raw::c_char)
-> *mut PGconn;
}
extern "C" {
pub fn PQconnectStartParams(keywords:
*const *const ::std::os::raw::c_char,
values: *const *const ::std::os::raw::c_char,
expand_dbname: ::std::os::raw::c_int)
-> *mut PGconn;
}
extern "C" {
pub fn PQconnectPoll(conn: *mut PGconn) -> PostgresPollingStatusType;
}
extern "C" {
pub fn PQconnectdb(conninfo: *const ::std::os::raw::c_char)
-> *mut PGconn;
}
extern "C" {
pub fn PQconnectdbParams(keywords: *const *const ::std::os::raw::c_char,
values: *const *const ::std::os::raw::c_char,
expand_dbname: ::std::os::raw::c_int)
-> *mut PGconn;
}
extern "C" {
pub fn PQsetdbLogin(pghost: *const ::std::os::raw::c_char,
pgport: *const ::std::os::raw::c_char,
pgoptions: *const ::std::os::raw::c_char,
pgtty: *const ::std::os::raw::c_char,
dbName: *const ::std::os::raw::c_char,
login: *const ::std::os::raw::c_char,
pwd: *const ::std::os::raw::c_char) -> *mut PGconn;
}
extern "C" {
pub fn PQfinish(conn: *mut PGconn);
}
extern "C" {
pub fn PQconndefaults() -> *mut PQconninfoOption;
}
extern "C" {
pub fn PQconninfoParse(conninfo: *const ::std::os::raw::c_char,
errmsg: *mut *mut ::std::os::raw::c_char)
-> *mut PQconninfoOption;
}
extern "C" {
pub fn PQconninfo(conn: *mut PGconn) -> *mut PQconninfoOption;
}
extern "C" {
pub fn PQconninfoFree(connOptions: *mut PQconninfoOption);
}
extern "C" {
pub fn PQresetStart(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQresetPoll(conn: *mut PGconn) -> PostgresPollingStatusType;
}
extern "C" {
pub fn PQreset(conn: *mut PGconn);
}
extern "C" {
pub fn PQgetCancel(conn: *mut PGconn) -> *mut PGcancel;
}
extern "C" {
pub fn PQfreeCancel(cancel: *mut PGcancel);
}
extern "C" {
pub fn PQcancel(cancel: *mut PGcancel,
errbuf: *mut ::std::os::raw::c_char,
errbufsize: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQrequestCancel(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQdb(conn: *const PGconn) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn PQuser(conn: *const PGconn) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn PQpass(conn: *const PGconn) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn PQhost(conn: *const PGconn) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn PQport(conn: *const PGconn) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn PQtty(conn: *const PGconn) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn PQoptions(conn: *const PGconn) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn PQstatus(conn: *const PGconn) -> ConnStatusType;
}
extern "C" {
pub fn PQtransactionStatus(conn: *const PGconn)
-> PGTransactionStatusType;
}
extern "C" {
pub fn PQparameterStatus(conn: *const PGconn,
paramName: *const ::std::os::raw::c_char)
-> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn PQprotocolVersion(conn: *const PGconn) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQserverVersion(conn: *const PGconn) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQerrorMessage(conn: *const PGconn) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn PQsocket(conn: *const PGconn) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQbackendPID(conn: *const PGconn) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQconnectionNeedsPassword(conn: *const PGconn)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQconnectionUsedPassword(conn: *const PGconn)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQclientEncoding(conn: *const PGconn) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQsetClientEncoding(conn: *mut PGconn,
encoding: *const ::std::os::raw::c_char)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQsslInUse(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQsslStruct(conn: *mut PGconn,
struct_name: *const ::std::os::raw::c_char)
-> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn PQsslAttribute(conn: *mut PGconn,
attribute_name: *const ::std::os::raw::c_char)
-> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn PQsslAttributeNames(conn: *mut PGconn)
-> *const *const ::std::os::raw::c_char;
}
extern "C" {
pub fn PQgetssl(conn: *mut PGconn) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn PQinitSSL(do_init: ::std::os::raw::c_int);
}
extern "C" {
pub fn PQinitOpenSSL(do_ssl: ::std::os::raw::c_int,
do_crypto: ::std::os::raw::c_int);
}
extern "C" {
pub fn PQsetErrorVerbosity(conn: *mut PGconn, verbosity: PGVerbosity)
-> PGVerbosity;
}
extern "C" {
pub fn PQtrace(conn: *mut PGconn, debug_port: *mut FILE);
}
extern "C" {
pub fn PQuntrace(conn: *mut PGconn);
}
extern "C" {
pub fn PQsetNoticeReceiver(conn: *mut PGconn, proc_: PQnoticeReceiver,
arg: *mut ::std::os::raw::c_void)
-> PQnoticeReceiver;
}
extern "C" {
pub fn PQsetNoticeProcessor(conn: *mut PGconn, proc_: PQnoticeProcessor,
arg: *mut ::std::os::raw::c_void)
-> PQnoticeProcessor;
}
pub type pgthreadlock_t =
::std::option::Option<unsafe extern "C" fn(acquire:
::std::os::raw::c_int)>;
extern "C" {
pub fn PQregisterThreadLock(newhandler: pgthreadlock_t) -> pgthreadlock_t;
}
extern "C" {
pub fn PQexec(conn: *mut PGconn, query: *const ::std::os::raw::c_char)
-> *mut PGresult;
}
extern "C" {
pub fn PQexecParams(conn: *mut PGconn,
command: *const ::std::os::raw::c_char,
nParams: ::std::os::raw::c_int,
paramTypes: *const Oid,
paramValues: *const *const ::std::os::raw::c_char,
paramLengths: *const ::std::os::raw::c_int,
paramFormats: *const ::std::os::raw::c_int,
resultFormat: ::std::os::raw::c_int) -> *mut PGresult;
}
extern "C" {
pub fn PQprepare(conn: *mut PGconn,
stmtName: *const ::std::os::raw::c_char,
query: *const ::std::os::raw::c_char,
nParams: ::std::os::raw::c_int, paramTypes: *const Oid)
-> *mut PGresult;
}
extern "C" {
pub fn PQexecPrepared(conn: *mut PGconn,
stmtName: *const ::std::os::raw::c_char,
nParams: ::std::os::raw::c_int,
paramValues: *const *const ::std::os::raw::c_char,
paramLengths: *const ::std::os::raw::c_int,
paramFormats: *const ::std::os::raw::c_int,
resultFormat: ::std::os::raw::c_int)
-> *mut PGresult;
}
extern "C" {
pub fn PQsendQuery(conn: *mut PGconn,
query: *const ::std::os::raw::c_char)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQsendQueryParams(conn: *mut PGconn,
command: *const ::std::os::raw::c_char,
nParams: ::std::os::raw::c_int,
paramTypes: *const Oid,
paramValues:
*const *const ::std::os::raw::c_char,
paramLengths: *const ::std::os::raw::c_int,
paramFormats: *const ::std::os::raw::c_int,
resultFormat: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQsendPrepare(conn: *mut PGconn,
stmtName: *const ::std::os::raw::c_char,
query: *const ::std::os::raw::c_char,
nParams: ::std::os::raw::c_int,
paramTypes: *const Oid) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQsendQueryPrepared(conn: *mut PGconn,
stmtName: *const ::std::os::raw::c_char,
nParams: ::std::os::raw::c_int,
paramValues:
*const *const ::std::os::raw::c_char,
paramLengths: *const ::std::os::raw::c_int,
paramFormats: *const ::std::os::raw::c_int,
resultFormat: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQsetSingleRowMode(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQgetResult(conn: *mut PGconn) -> *mut PGresult;
}
extern "C" {
pub fn PQisBusy(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQconsumeInput(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQnotifies(conn: *mut PGconn) -> *mut PGnotify;
}
extern "C" {
pub fn PQputCopyData(conn: *mut PGconn,
buffer: *const ::std::os::raw::c_char,
nbytes: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQputCopyEnd(conn: *mut PGconn,
errormsg: *const ::std::os::raw::c_char)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQgetCopyData(conn: *mut PGconn,
buffer: *mut *mut ::std::os::raw::c_char,
async: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQgetline(conn: *mut PGconn, string: *mut ::std::os::raw::c_char,
length: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQputline(conn: *mut PGconn, string: *const ::std::os::raw::c_char)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQgetlineAsync(conn: *mut PGconn,
buffer: *mut ::std::os::raw::c_char,
bufsize: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQputnbytes(conn: *mut PGconn,
buffer: *const ::std::os::raw::c_char,
nbytes: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQendcopy(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQsetnonblocking(conn: *mut PGconn, arg: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQisnonblocking(conn: *const PGconn) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQisthreadsafe() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQping(conninfo: *const ::std::os::raw::c_char) -> PGPing;
}
extern "C" {
pub fn PQpingParams(keywords: *const *const ::std::os::raw::c_char,
values: *const *const ::std::os::raw::c_char,
expand_dbname: ::std::os::raw::c_int) -> PGPing;
}
extern "C" {
pub fn PQflush(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQfn(conn: *mut PGconn, fnid: ::std::os::raw::c_int,
result_buf: *mut ::std::os::raw::c_int,
result_len: *mut ::std::os::raw::c_int,
result_is_int: ::std::os::raw::c_int, args: *const PQArgBlock,
nargs: ::std::os::raw::c_int) -> *mut PGresult;
}
extern "C" {
pub fn PQresultStatus(res: *const PGresult) -> ExecStatusType;
}
extern "C" {
pub fn PQresStatus(status: ExecStatusType) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn PQresultErrorMessage(res: *const PGresult)
-> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn PQresultErrorField(res: *const PGresult,
fieldcode: ::std::os::raw::c_int)
-> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn PQntuples(res: *const PGresult) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQnfields(res: *const PGresult) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQbinaryTuples(res: *const PGresult) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQfname(res: *const PGresult, field_num: ::std::os::raw::c_int)
-> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn PQfnumber(res: *const PGresult,
field_name: *const ::std::os::raw::c_char)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQftable(res: *const PGresult, field_num: ::std::os::raw::c_int)
-> Oid;
}
extern "C" {
pub fn PQftablecol(res: *const PGresult, field_num: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQfformat(res: *const PGresult, field_num: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQftype(res: *const PGresult, field_num: ::std::os::raw::c_int)
-> Oid;
}
extern "C" {
pub fn PQfsize(res: *const PGresult, field_num: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQfmod(res: *const PGresult, field_num: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQcmdStatus(res: *mut PGresult) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn PQoidStatus(res: *const PGresult) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn PQoidValue(res: *const PGresult) -> Oid;
}
extern "C" {
pub fn PQcmdTuples(res: *mut PGresult) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn PQgetvalue(res: *const PGresult, tup_num: ::std::os::raw::c_int,
field_num: ::std::os::raw::c_int)
-> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn PQgetlength(res: *const PGresult, tup_num: ::std::os::raw::c_int,
field_num: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQgetisnull(res: *const PGresult, tup_num: ::std::os::raw::c_int,
field_num: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQnparams(res: *const PGresult) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQparamtype(res: *const PGresult, param_num: ::std::os::raw::c_int)
-> Oid;
}
extern "C" {
pub fn PQdescribePrepared(conn: *mut PGconn,
stmt: *const ::std::os::raw::c_char)
-> *mut PGresult;
}
extern "C" {
pub fn PQdescribePortal(conn: *mut PGconn,
portal: *const ::std::os::raw::c_char)
-> *mut PGresult;
}
extern "C" {
pub fn PQsendDescribePrepared(conn: *mut PGconn,
stmt: *const ::std::os::raw::c_char)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQsendDescribePortal(conn: *mut PGconn,
portal: *const ::std::os::raw::c_char)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQclear(res: *mut PGresult);
}
extern "C" {
pub fn PQfreemem(ptr: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn PQmakeEmptyPGresult(conn: *mut PGconn, status: ExecStatusType)
-> *mut PGresult;
}
extern "C" {
pub fn PQcopyResult(src: *const PGresult, flags: ::std::os::raw::c_int)
-> *mut PGresult;
}
extern "C" {
pub fn PQsetResultAttrs(res: *mut PGresult,
numAttributes: ::std::os::raw::c_int,
attDescs: *mut PGresAttDesc)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQresultAlloc(res: *mut PGresult, nBytes: usize)
-> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn PQsetvalue(res: *mut PGresult, tup_num: ::std::os::raw::c_int,
field_num: ::std::os::raw::c_int,
value: *mut ::std::os::raw::c_char,
len: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQescapeStringConn(conn: *mut PGconn,
to: *mut ::std::os::raw::c_char,
from: *const ::std::os::raw::c_char,
length: usize,
error: *mut ::std::os::raw::c_int) -> usize;
}
extern "C" {
pub fn PQescapeLiteral(conn: *mut PGconn,
str: *const ::std::os::raw::c_char, len: usize)
-> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn PQescapeIdentifier(conn: *mut PGconn,
str: *const ::std::os::raw::c_char, len: usize)
-> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn PQescapeByteaConn(conn: *mut PGconn,
from: *const ::std::os::raw::c_uchar,
from_length: usize, to_length: *mut usize)
-> *mut ::std::os::raw::c_uchar;
}
extern "C" {
pub fn PQunescapeBytea(strtext: *const ::std::os::raw::c_uchar,
retbuflen: *mut usize)
-> *mut ::std::os::raw::c_uchar;
}
extern "C" {
pub fn PQescapeString(to: *mut ::std::os::raw::c_char,
from: *const ::std::os::raw::c_char, length: usize)
-> usize;
}
extern "C" {
pub fn PQescapeBytea(from: *const ::std::os::raw::c_uchar,
from_length: usize, to_length: *mut usize)
-> *mut ::std::os::raw::c_uchar;
}
extern "C" {
pub fn PQprint(fout: *mut FILE, res: *const PGresult,
ps: *const PQprintOpt);
}
extern "C" {
pub fn PQdisplayTuples(res: *const PGresult, fp: *mut FILE,
fillAlign: ::std::os::raw::c_int,
fieldSep: *const ::std::os::raw::c_char,
printHeader: ::std::os::raw::c_int,
quiet: ::std::os::raw::c_int);
}
extern "C" {
pub fn PQprintTuples(res: *const PGresult, fout: *mut FILE,
printAttName: ::std::os::raw::c_int,
terseOutput: ::std::os::raw::c_int,
width: ::std::os::raw::c_int);
}
extern "C" {
pub fn PQlibVersion() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQmblen(s: *const ::std::os::raw::c_char,
encoding: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQdsplen(s: *const ::std::os::raw::c_char,
encoding: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQenv2encoding() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn PQencryptPassword(passwd: *const ::std::os::raw::c_char,
user: *const ::std::os::raw::c_char)
-> *mut ::std::os::raw::c_char;
}