1- /* automatically generated by rust-bindgen 0.72.0  */ 
1+ /* automatically generated by rust-bindgen 0.72.1  */ 
22
33use  libc:: FILE ; 
44
@@ -29,6 +29,8 @@ pub const LIBPQ_HAS_CHUNK_MODE: u32 = 1;
2929pub  const  LIBPQ_HAS_CLOSE_PREPARED :  u32  = 1 ; 
3030pub  const  LIBPQ_HAS_SEND_PIPELINE_SYNC :  u32  = 1 ; 
3131pub  const  LIBPQ_HAS_SOCKET_POLL :  u32  = 1 ; 
32+ pub  const  LIBPQ_HAS_FULL_PROTOCOL_VERSION :  u32  = 1 ; 
33+ pub  const  LIBPQ_HAS_PROMPT_OAUTH_DEVICE :  u32  = 1 ; 
3234pub  const  PG_COPYRES_ATTRS :  u32  = 1 ; 
3335pub  const  PG_COPYRES_TUPLES :  u32  = 2 ; 
3436pub  const  PG_COPYRES_EVENTS :  u32  = 4 ; 
@@ -38,7 +40,7 @@ pub const PQTRACE_REGRESS_MODE: u32 = 2;
3840pub  const  PQ_QUERY_PARAM_MAX_LIMIT :  u32  = 65535 ; 
3941pub  const  PQnoPasswordSupplied :  & [ u8 ;  35 ]  = b"fe_sendauth: no password supplied\n \0 " ; 
4042pub  type  Oid  = :: std:: os:: raw:: c_uint ; 
41- pub  type  pg_int64  = :: std :: os :: raw :: c_long ; 
43+ pub  type  pg_int64  = i64 ; 
4244#[ repr( u32 ) ]  
4345#[ derive( Debug ,  Copy ,  Clone ,  Hash ,  PartialEq ,  Eq ) ]  
4446pub  enum  ConnStatusType  { 
@@ -57,6 +59,7 @@ pub enum ConnStatusType {
5759    CONNECTION_CHECK_TARGET  = 12 , 
5860    CONNECTION_CHECK_STANDBY  = 13 , 
5961    CONNECTION_ALLOCATED  = 14 , 
62+     CONNECTION_AUTHENTICATING  = 15 , 
6063} 
6164#[ repr( u32 ) ]  
6265#[ derive( Debug ,  Copy ,  Clone ,  Hash ,  PartialEq ,  Eq ) ]  
@@ -123,6 +126,12 @@ pub enum PGpipelineStatus {
123126    PQ_PIPELINE_ON  = 1 , 
124127    PQ_PIPELINE_ABORTED  = 2 , 
125128} 
129+ #[ repr( u32 ) ]  
130+ #[ derive( Debug ,  Copy ,  Clone ,  Hash ,  PartialEq ,  Eq ) ]  
131+ pub  enum  PGauthData  { 
132+     PQAUTHDATA_PROMPT_OAUTH_DEVICE  = 0 , 
133+     PQAUTHDATA_OAUTH_BEARER_TOKEN  = 1 , 
134+ } 
126135#[ repr( C ) ]  
127136#[ derive( Debug ,  Copy ,  Clone ) ]  
128137pub  struct  pg_conn  { 
@@ -165,7 +174,7 @@ const _: () = {
165174    [ "Offset of field: pgNotify::next" ] [ :: std:: mem:: offset_of!( pgNotify,  next)  - 24usize ] ; 
166175} ; 
167176pub  type  PGnotify  = pgNotify ; 
168- pub  type  pg_usec_time_t  = pg_int64 ; 
177+ pub  type  pg_usec_time_t  = i64 ; 
169178pub  type  PQnoticeReceiver  = :: std:: option:: Option < 
170179    unsafe  extern  "C"  fn ( arg :  * mut  :: std:: os:: raw:: c_void ,  res :  * const  PGresult ) , 
171180> ; 
@@ -444,6 +453,9 @@ unsafe extern "C" {
444453unsafe  extern  "C"  { 
445454    pub  fn  PQprotocolVersion ( conn :  * const  PGconn )  -> :: std:: os:: raw:: c_int ; 
446455} 
456+ unsafe  extern  "C"  { 
457+     pub  fn  PQfullProtocolVersion ( conn :  * const  PGconn )  -> :: std:: os:: raw:: c_int ; 
458+ } 
447459unsafe  extern  "C"  { 
448460    pub  fn  PQserverVersion ( conn :  * const  PGconn )  -> :: std:: os:: raw:: c_int ; 
449461} 
@@ -1036,9 +1048,9 @@ unsafe extern "C" {
10361048    pub  fn  lo_lseek64 ( 
10371049        conn :  * mut  PGconn , 
10381050        fd :  :: std:: os:: raw:: c_int , 
1039-         offset :  pg_int64 , 
1051+         offset :  i64 , 
10401052        whence :  :: std:: os:: raw:: c_int , 
1041-     )  -> pg_int64 ; 
1053+     )  -> i64 ; 
10421054} 
10431055unsafe  extern  "C"  { 
10441056    pub  fn  lo_creat ( conn :  * mut  PGconn ,  mode :  :: std:: os:: raw:: c_int )  -> Oid ; 
@@ -1050,7 +1062,7 @@ unsafe extern "C" {
10501062    pub  fn  lo_tell ( conn :  * mut  PGconn ,  fd :  :: std:: os:: raw:: c_int )  -> :: std:: os:: raw:: c_int ; 
10511063} 
10521064unsafe  extern  "C"  { 
1053-     pub  fn  lo_tell64 ( conn :  * mut  PGconn ,  fd :  :: std:: os:: raw:: c_int )  -> pg_int64 ; 
1065+     pub  fn  lo_tell64 ( conn :  * mut  PGconn ,  fd :  :: std:: os:: raw:: c_int )  -> i64 ; 
10541066} 
10551067unsafe  extern  "C"  { 
10561068    pub  fn  lo_truncate ( 
@@ -1063,7 +1075,7 @@ unsafe extern "C" {
10631075    pub  fn  lo_truncate64 ( 
10641076        conn :  * mut  PGconn , 
10651077        fd :  :: std:: os:: raw:: c_int , 
1066-         len :  pg_int64 , 
1078+         len :  i64 , 
10671079    )  -> :: std:: os:: raw:: c_int ; 
10681080} 
10691081unsafe  extern  "C"  { 
@@ -1121,6 +1133,63 @@ unsafe extern "C" {
11211133unsafe  extern  "C"  { 
11221134    pub  fn  PQenv2encoding ( )  -> :: std:: os:: raw:: c_int ; 
11231135} 
1136+ #[ repr( C ) ]  
1137+ #[ derive( Debug ,  Copy ,  Clone ) ]  
1138+ pub  struct  _PGpromptOAuthDevice  { 
1139+     pub  verification_uri :  * const  :: std:: os:: raw:: c_char , 
1140+     pub  user_code :  * const  :: std:: os:: raw:: c_char , 
1141+     pub  verification_uri_complete :  * const  :: std:: os:: raw:: c_char , 
1142+     pub  expires_in :  :: std:: os:: raw:: c_int , 
1143+ } 
1144+ #[ allow( clippy:: unnecessary_operation,  clippy:: identity_op) ]  
1145+ const  _:  ( )  = { 
1146+     [ "Size of _PGpromptOAuthDevice" ] [ :: std:: mem:: size_of :: < _PGpromptOAuthDevice > ( )  - 32usize ] ; 
1147+     [ "Alignment of _PGpromptOAuthDevice" ] [ :: std:: mem:: align_of :: < _PGpromptOAuthDevice > ( )  - 8usize ] ; 
1148+     [ "Offset of field: _PGpromptOAuthDevice::verification_uri" ] 
1149+         [ :: std:: mem:: offset_of!( _PGpromptOAuthDevice,  verification_uri)  - 0usize ] ; 
1150+     [ "Offset of field: _PGpromptOAuthDevice::user_code" ] 
1151+         [ :: std:: mem:: offset_of!( _PGpromptOAuthDevice,  user_code)  - 8usize ] ; 
1152+     [ "Offset of field: _PGpromptOAuthDevice::verification_uri_complete" ] 
1153+         [ :: std:: mem:: offset_of!( _PGpromptOAuthDevice,  verification_uri_complete)  - 16usize ] ; 
1154+     [ "Offset of field: _PGpromptOAuthDevice::expires_in" ] 
1155+         [ :: std:: mem:: offset_of!( _PGpromptOAuthDevice,  expires_in)  - 24usize ] ; 
1156+ } ; 
1157+ pub  type  PGpromptOAuthDevice  = _PGpromptOAuthDevice ; 
1158+ #[ repr( C ) ]  
1159+ #[ derive( Debug ,  Copy ,  Clone ) ]  
1160+ pub  struct  PGoauthBearerRequest  { 
1161+     pub  openid_configuration :  * const  :: std:: os:: raw:: c_char , 
1162+     pub  scope :  * const  :: std:: os:: raw:: c_char , 
1163+     pub  async_ :  :: std:: option:: Option < 
1164+         unsafe  extern  "C"  fn ( 
1165+             conn :  * mut  PGconn , 
1166+             request :  * mut  PGoauthBearerRequest , 
1167+             altsock :  * mut  :: std:: os:: raw:: c_int , 
1168+         )  -> PostgresPollingStatusType , 
1169+     > , 
1170+     pub  cleanup :  :: std:: option:: Option < 
1171+         unsafe  extern  "C"  fn ( conn :  * mut  PGconn ,  request :  * mut  PGoauthBearerRequest ) , 
1172+     > , 
1173+     pub  token :  * mut  :: std:: os:: raw:: c_char , 
1174+     pub  user :  * mut  :: std:: os:: raw:: c_void , 
1175+ } 
1176+ #[ allow( clippy:: unnecessary_operation,  clippy:: identity_op) ]  
1177+ const  _:  ( )  = { 
1178+     [ "Size of PGoauthBearerRequest" ] [ :: std:: mem:: size_of :: < PGoauthBearerRequest > ( )  - 48usize ] ; 
1179+     [ "Alignment of PGoauthBearerRequest" ] [ :: std:: mem:: align_of :: < PGoauthBearerRequest > ( )  - 8usize ] ; 
1180+     [ "Offset of field: PGoauthBearerRequest::openid_configuration" ] 
1181+         [ :: std:: mem:: offset_of!( PGoauthBearerRequest ,  openid_configuration)  - 0usize ] ; 
1182+     [ "Offset of field: PGoauthBearerRequest::scope" ] 
1183+         [ :: std:: mem:: offset_of!( PGoauthBearerRequest ,  scope)  - 8usize ] ; 
1184+     [ "Offset of field: PGoauthBearerRequest::async_" ] 
1185+         [ :: std:: mem:: offset_of!( PGoauthBearerRequest ,  async_)  - 16usize ] ; 
1186+     [ "Offset of field: PGoauthBearerRequest::cleanup" ] 
1187+         [ :: std:: mem:: offset_of!( PGoauthBearerRequest ,  cleanup)  - 24usize ] ; 
1188+     [ "Offset of field: PGoauthBearerRequest::token" ] 
1189+         [ :: std:: mem:: offset_of!( PGoauthBearerRequest ,  token)  - 32usize ] ; 
1190+     [ "Offset of field: PGoauthBearerRequest::user" ] 
1191+         [ :: std:: mem:: offset_of!( PGoauthBearerRequest ,  user)  - 40usize ] ; 
1192+ } ; 
11241193unsafe  extern  "C"  { 
11251194    pub  fn  PQencryptPassword ( 
11261195        passwd :  * const  :: std:: os:: raw:: c_char , 
@@ -1142,6 +1211,26 @@ unsafe extern "C" {
11421211        passwd :  * const  :: std:: os:: raw:: c_char , 
11431212    )  -> * mut  PGresult ; 
11441213} 
1214+ pub  type  PQauthDataHook_type  = :: std:: option:: Option < 
1215+     unsafe  extern  "C"  fn ( 
1216+         type_ :  PGauthData , 
1217+         conn :  * mut  PGconn , 
1218+         data :  * mut  :: std:: os:: raw:: c_void , 
1219+     )  -> :: std:: os:: raw:: c_int , 
1220+ > ; 
1221+ unsafe  extern  "C"  { 
1222+     pub  fn  PQsetAuthDataHook ( hook :  PQauthDataHook_type ) ; 
1223+ } 
1224+ unsafe  extern  "C"  { 
1225+     pub  fn  PQgetAuthDataHook ( )  -> PQauthDataHook_type ; 
1226+ } 
1227+ unsafe  extern  "C"  { 
1228+     pub  fn  PQdefaultAuthDataHook ( 
1229+         type_ :  PGauthData , 
1230+         conn :  * mut  PGconn , 
1231+         data :  * mut  :: std:: os:: raw:: c_void , 
1232+     )  -> :: std:: os:: raw:: c_int ; 
1233+ } 
11451234unsafe  extern  "C"  { 
11461235    pub  fn  pg_char_to_encoding ( name :  * const  :: std:: os:: raw:: c_char )  -> :: std:: os:: raw:: c_int ; 
11471236} 
0 commit comments