use libc::FILE;
pub const PG_DIAG_SEVERITY: u8 = 83u8;
pub const PG_DIAG_SEVERITY_NONLOCALIZED: u8 = 86u8;
pub const PG_DIAG_SQLSTATE: u8 = 67u8;
pub const PG_DIAG_MESSAGE_PRIMARY: u8 = 77u8;
pub const PG_DIAG_MESSAGE_DETAIL: u8 = 68u8;
pub const PG_DIAG_MESSAGE_HINT: u8 = 72u8;
pub const PG_DIAG_STATEMENT_POSITION: u8 = 80u8;
pub const PG_DIAG_INTERNAL_POSITION: u8 = 112u8;
pub const PG_DIAG_INTERNAL_QUERY: u8 = 113u8;
pub const PG_DIAG_CONTEXT: u8 = 87u8;
pub const PG_DIAG_SCHEMA_NAME: u8 = 115u8;
pub const PG_DIAG_TABLE_NAME: u8 = 116u8;
pub const PG_DIAG_COLUMN_NAME: u8 = 99u8;
pub const PG_DIAG_DATATYPE_NAME: u8 = 100u8;
pub const PG_DIAG_CONSTRAINT_NAME: u8 = 110u8;
pub const PG_DIAG_SOURCE_FILE: u8 = 70u8;
pub const PG_DIAG_SOURCE_LINE: u8 = 76u8;
pub const PG_DIAG_SOURCE_FUNCTION: u8 = 82u8;
pub const LIBPQ_HAS_PIPELINING: u32 = 1;
pub const LIBPQ_HAS_TRACE_FLAGS: u32 = 1;
pub const LIBPQ_HAS_SSL_LIBRARY_DETECTION: u32 = 1;
pub const LIBPQ_HAS_ASYNC_CANCEL: u32 = 1;
pub const LIBPQ_HAS_CHANGE_PASSWORD: u32 = 1;
pub const LIBPQ_HAS_CHUNK_MODE: u32 = 1;
pub const LIBPQ_HAS_CLOSE_PREPARED: u32 = 1;
pub const LIBPQ_HAS_SEND_PIPELINE_SYNC: u32 = 1;
pub const LIBPQ_HAS_SOCKET_POLL: u32 = 1;
pub const LIBPQ_HAS_FULL_PROTOCOL_VERSION: u32 = 1;
pub const LIBPQ_HAS_PROMPT_OAUTH_DEVICE: u32 = 1;
pub const PG_COPYRES_ATTRS: u32 = 1;
pub const PG_COPYRES_TUPLES: u32 = 2;
pub const PG_COPYRES_EVENTS: u32 = 4;
pub const PG_COPYRES_NOTICEHOOKS: u32 = 8;
pub const PQTRACE_SUPPRESS_TIMESTAMPS: u32 = 1;
pub const PQTRACE_REGRESS_MODE: u32 = 2;
pub const PQ_QUERY_PARAM_MAX_LIMIT: u32 = 65535;
pub const PQnoPasswordSupplied: &[u8; 35] = b"fe_sendauth: no password supplied\n\0";
pub type Oid = ::std::os::raw::c_uint;
pub type pg_int64 = i64;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ConnStatusType {
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,
CONNECTION_CHECK_WRITABLE = 9,
CONNECTION_CONSUME = 10,
CONNECTION_GSS_STARTUP = 11,
CONNECTION_CHECK_TARGET = 12,
CONNECTION_CHECK_STANDBY = 13,
CONNECTION_ALLOCATED = 14,
CONNECTION_AUTHENTICATING = 15,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum PostgresPollingStatusType {
PGRES_POLLING_FAILED = 0,
PGRES_POLLING_READING = 1,
PGRES_POLLING_WRITING = 2,
PGRES_POLLING_OK = 3,
PGRES_POLLING_ACTIVE = 4,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ExecStatusType {
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,
PGRES_PIPELINE_SYNC = 10,
PGRES_PIPELINE_ABORTED = 11,
PGRES_TUPLES_CHUNK = 12,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum PGTransactionStatusType {
PQTRANS_IDLE = 0,
PQTRANS_ACTIVE = 1,
PQTRANS_INTRANS = 2,
PQTRANS_INERROR = 3,
PQTRANS_UNKNOWN = 4,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum PGVerbosity {
PQERRORS_TERSE = 0,
PQERRORS_DEFAULT = 1,
PQERRORS_VERBOSE = 2,
PQERRORS_SQLSTATE = 3,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum PGContextVisibility {
PQSHOW_CONTEXT_NEVER = 0,
PQSHOW_CONTEXT_ERRORS = 1,
PQSHOW_CONTEXT_ALWAYS = 2,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum PGPing {
PQPING_OK = 0,
PQPING_REJECT = 1,
PQPING_NO_RESPONSE = 2,
PQPING_NO_ATTEMPT = 3,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum PGpipelineStatus {
PQ_PIPELINE_OFF = 0,
PQ_PIPELINE_ON = 1,
PQ_PIPELINE_ABORTED = 2,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum PGauthData {
PQAUTHDATA_PROMPT_OAUTH_DEVICE = 0,
PQAUTHDATA_OAUTH_BEARER_TOKEN = 1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pg_conn {
_unused: [u8; 0],
}
pub type PGconn = pg_conn;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pg_cancel_conn {
_unused: [u8; 0],
}
pub type PGcancelConn = pg_cancel_conn;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pg_result {
_unused: [u8; 0],
}
pub type PGresult = pg_result;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pg_cancel {
_unused: [u8; 0],
}
pub type PGcancel = pg_cancel;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of pgNotify"][::std::mem::size_of::<pgNotify>() - 32usize];
["Alignment of pgNotify"][::std::mem::align_of::<pgNotify>() - 8usize];
["Offset of field: pgNotify::relname"][::std::mem::offset_of!(pgNotify, relname) - 0usize];
["Offset of field: pgNotify::be_pid"][::std::mem::offset_of!(pgNotify, be_pid) - 8usize];
["Offset of field: pgNotify::extra"][::std::mem::offset_of!(pgNotify, extra) - 16usize];
["Offset of field: pgNotify::next"][::std::mem::offset_of!(pgNotify, next) - 24usize];
};
pub type PGnotify = pgNotify;
pub type pg_usec_time_t = i64;
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, Clone)]
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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _PQprintOpt"][::std::mem::size_of::<_PQprintOpt>() - 40usize];
["Alignment of _PQprintOpt"][::std::mem::align_of::<_PQprintOpt>() - 8usize];
["Offset of field: _PQprintOpt::header"][::std::mem::offset_of!(_PQprintOpt, header) - 0usize];
["Offset of field: _PQprintOpt::align"][::std::mem::offset_of!(_PQprintOpt, align) - 1usize];
["Offset of field: _PQprintOpt::standard"]
[::std::mem::offset_of!(_PQprintOpt, standard) - 2usize];
["Offset of field: _PQprintOpt::html3"][::std::mem::offset_of!(_PQprintOpt, html3) - 3usize];
["Offset of field: _PQprintOpt::expanded"]
[::std::mem::offset_of!(_PQprintOpt, expanded) - 4usize];
["Offset of field: _PQprintOpt::pager"][::std::mem::offset_of!(_PQprintOpt, pager) - 5usize];
["Offset of field: _PQprintOpt::fieldSep"]
[::std::mem::offset_of!(_PQprintOpt, fieldSep) - 8usize];
["Offset of field: _PQprintOpt::tableOpt"]
[::std::mem::offset_of!(_PQprintOpt, tableOpt) - 16usize];
["Offset of field: _PQprintOpt::caption"]
[::std::mem::offset_of!(_PQprintOpt, caption) - 24usize];
["Offset of field: _PQprintOpt::fieldName"]
[::std::mem::offset_of!(_PQprintOpt, fieldName) - 32usize];
};
pub type PQprintOpt = _PQprintOpt;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _PQconninfoOption"][::std::mem::size_of::<_PQconninfoOption>() - 56usize];
["Alignment of _PQconninfoOption"][::std::mem::align_of::<_PQconninfoOption>() - 8usize];
["Offset of field: _PQconninfoOption::keyword"]
[::std::mem::offset_of!(_PQconninfoOption, keyword) - 0usize];
["Offset of field: _PQconninfoOption::envvar"]
[::std::mem::offset_of!(_PQconninfoOption, envvar) - 8usize];
["Offset of field: _PQconninfoOption::compiled"]
[::std::mem::offset_of!(_PQconninfoOption, compiled) - 16usize];
["Offset of field: _PQconninfoOption::val"]
[::std::mem::offset_of!(_PQconninfoOption, val) - 24usize];
["Offset of field: _PQconninfoOption::label"]
[::std::mem::offset_of!(_PQconninfoOption, label) - 32usize];
["Offset of field: _PQconninfoOption::dispchar"]
[::std::mem::offset_of!(_PQconninfoOption, dispchar) - 40usize];
["Offset of field: _PQconninfoOption::dispsize"]
[::std::mem::offset_of!(_PQconninfoOption, dispsize) - 48usize];
};
pub type PQconninfoOption = _PQconninfoOption;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct PQArgBlock {
pub len: ::std::os::raw::c_int,
pub isint: ::std::os::raw::c_int,
pub u: PQArgBlock__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union PQArgBlock__bindgen_ty_1 {
pub ptr: *mut ::std::os::raw::c_int,
pub integer: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of PQArgBlock__bindgen_ty_1"]
[::std::mem::size_of::<PQArgBlock__bindgen_ty_1>() - 8usize];
["Alignment of PQArgBlock__bindgen_ty_1"]
[::std::mem::align_of::<PQArgBlock__bindgen_ty_1>() - 8usize];
["Offset of field: PQArgBlock__bindgen_ty_1::ptr"]
[::std::mem::offset_of!(PQArgBlock__bindgen_ty_1, ptr) - 0usize];
["Offset of field: PQArgBlock__bindgen_ty_1::integer"]
[::std::mem::offset_of!(PQArgBlock__bindgen_ty_1, integer) - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of PQArgBlock"][::std::mem::size_of::<PQArgBlock>() - 16usize];
["Alignment of PQArgBlock"][::std::mem::align_of::<PQArgBlock>() - 8usize];
["Offset of field: PQArgBlock::len"][::std::mem::offset_of!(PQArgBlock, len) - 0usize];
["Offset of field: PQArgBlock::isint"][::std::mem::offset_of!(PQArgBlock, isint) - 4usize];
["Offset of field: PQArgBlock::u"][::std::mem::offset_of!(PQArgBlock, u) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
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,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of pgresAttDesc"][::std::mem::size_of::<pgresAttDesc>() - 32usize];
["Alignment of pgresAttDesc"][::std::mem::align_of::<pgresAttDesc>() - 8usize];
["Offset of field: pgresAttDesc::name"][::std::mem::offset_of!(pgresAttDesc, name) - 0usize];
["Offset of field: pgresAttDesc::tableid"]
[::std::mem::offset_of!(pgresAttDesc, tableid) - 8usize];
["Offset of field: pgresAttDesc::columnid"]
[::std::mem::offset_of!(pgresAttDesc, columnid) - 12usize];
["Offset of field: pgresAttDesc::format"]
[::std::mem::offset_of!(pgresAttDesc, format) - 16usize];
["Offset of field: pgresAttDesc::typid"][::std::mem::offset_of!(pgresAttDesc, typid) - 20usize];
["Offset of field: pgresAttDesc::typlen"]
[::std::mem::offset_of!(pgresAttDesc, typlen) - 24usize];
["Offset of field: pgresAttDesc::atttypmod"]
[::std::mem::offset_of!(pgresAttDesc, atttypmod) - 28usize];
};
pub type PGresAttDesc = pgresAttDesc;
unsafe extern "C" {
pub fn PQconnectStart(conninfo: *const ::std::os::raw::c_char) -> *mut PGconn;
}
unsafe 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;
}
unsafe extern "C" {
pub fn PQconnectPoll(conn: *mut PGconn) -> PostgresPollingStatusType;
}
unsafe extern "C" {
pub fn PQconnectdb(conninfo: *const ::std::os::raw::c_char) -> *mut PGconn;
}
unsafe 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;
}
unsafe 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;
}
unsafe extern "C" {
pub fn PQfinish(conn: *mut PGconn);
}
unsafe extern "C" {
pub fn PQconndefaults() -> *mut PQconninfoOption;
}
unsafe extern "C" {
pub fn PQconninfoParse(
conninfo: *const ::std::os::raw::c_char,
errmsg: *mut *mut ::std::os::raw::c_char,
) -> *mut PQconninfoOption;
}
unsafe extern "C" {
pub fn PQconninfo(conn: *mut PGconn) -> *mut PQconninfoOption;
}
unsafe extern "C" {
pub fn PQconninfoFree(connOptions: *mut PQconninfoOption);
}
unsafe extern "C" {
pub fn PQresetStart(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQresetPoll(conn: *mut PGconn) -> PostgresPollingStatusType;
}
unsafe extern "C" {
pub fn PQreset(conn: *mut PGconn);
}
unsafe extern "C" {
pub fn PQcancelCreate(conn: *mut PGconn) -> *mut PGcancelConn;
}
unsafe extern "C" {
pub fn PQcancelStart(cancelConn: *mut PGcancelConn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQcancelBlocking(cancelConn: *mut PGcancelConn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQcancelPoll(cancelConn: *mut PGcancelConn) -> PostgresPollingStatusType;
}
unsafe extern "C" {
pub fn PQcancelStatus(cancelConn: *const PGcancelConn) -> ConnStatusType;
}
unsafe extern "C" {
pub fn PQcancelSocket(cancelConn: *const PGcancelConn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQcancelErrorMessage(cancelConn: *const PGcancelConn) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQcancelReset(cancelConn: *mut PGcancelConn);
}
unsafe extern "C" {
pub fn PQcancelFinish(cancelConn: *mut PGcancelConn);
}
unsafe extern "C" {
pub fn PQgetCancel(conn: *mut PGconn) -> *mut PGcancel;
}
unsafe extern "C" {
pub fn PQfreeCancel(cancel: *mut PGcancel);
}
unsafe 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;
}
unsafe extern "C" {
pub fn PQrequestCancel(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQdb(conn: *const PGconn) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQuser(conn: *const PGconn) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQpass(conn: *const PGconn) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQhost(conn: *const PGconn) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQhostaddr(conn: *const PGconn) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQport(conn: *const PGconn) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQtty(conn: *const PGconn) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQoptions(conn: *const PGconn) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQstatus(conn: *const PGconn) -> ConnStatusType;
}
unsafe extern "C" {
pub fn PQtransactionStatus(conn: *const PGconn) -> PGTransactionStatusType;
}
unsafe extern "C" {
pub fn PQparameterStatus(
conn: *const PGconn,
paramName: *const ::std::os::raw::c_char,
) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQprotocolVersion(conn: *const PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQfullProtocolVersion(conn: *const PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQserverVersion(conn: *const PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQerrorMessage(conn: *const PGconn) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQsocket(conn: *const PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQbackendPID(conn: *const PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQpipelineStatus(conn: *const PGconn) -> PGpipelineStatus;
}
unsafe extern "C" {
pub fn PQconnectionNeedsPassword(conn: *const PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQconnectionUsedPassword(conn: *const PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQconnectionUsedGSSAPI(conn: *const PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQclientEncoding(conn: *const PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQsetClientEncoding(
conn: *mut PGconn,
encoding: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQsslInUse(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQsslStruct(
conn: *mut PGconn,
struct_name: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn PQsslAttribute(
conn: *mut PGconn,
attribute_name: *const ::std::os::raw::c_char,
) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQsslAttributeNames(conn: *mut PGconn) -> *const *const ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQgetssl(conn: *mut PGconn) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn PQinitSSL(do_init: ::std::os::raw::c_int);
}
unsafe extern "C" {
pub fn PQinitOpenSSL(do_ssl: ::std::os::raw::c_int, do_crypto: ::std::os::raw::c_int);
}
unsafe extern "C" {
pub fn PQgssEncInUse(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQgetgssctx(conn: *mut PGconn) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn PQsetErrorVerbosity(conn: *mut PGconn, verbosity: PGVerbosity) -> PGVerbosity;
}
unsafe extern "C" {
pub fn PQsetErrorContextVisibility(
conn: *mut PGconn,
show_context: PGContextVisibility,
) -> PGContextVisibility;
}
unsafe extern "C" {
pub fn PQsetNoticeReceiver(
conn: *mut PGconn,
proc_: PQnoticeReceiver,
arg: *mut ::std::os::raw::c_void,
) -> PQnoticeReceiver;
}
unsafe 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)>;
unsafe extern "C" {
pub fn PQregisterThreadLock(newhandler: pgthreadlock_t) -> pgthreadlock_t;
}
unsafe extern "C" {
pub fn PQtrace(conn: *mut PGconn, debug_port: *mut FILE);
}
unsafe extern "C" {
pub fn PQuntrace(conn: *mut PGconn);
}
unsafe extern "C" {
pub fn PQsetTraceFlags(conn: *mut PGconn, flags: ::std::os::raw::c_int);
}
unsafe extern "C" {
pub fn PQexec(conn: *mut PGconn, query: *const ::std::os::raw::c_char) -> *mut PGresult;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe extern "C" {
pub fn PQsendQuery(
conn: *mut PGconn,
query: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe extern "C" {
pub fn PQsetSingleRowMode(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQsetChunkedRowsMode(
conn: *mut PGconn,
chunkSize: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQgetResult(conn: *mut PGconn) -> *mut PGresult;
}
unsafe extern "C" {
pub fn PQisBusy(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQconsumeInput(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQenterPipelineMode(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQexitPipelineMode(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQpipelineSync(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQsendFlushRequest(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQsendPipelineSync(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQnotifies(conn: *mut PGconn) -> *mut PGnotify;
}
unsafe 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;
}
unsafe extern "C" {
pub fn PQputCopyEnd(
conn: *mut PGconn,
errormsg: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe 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;
}
unsafe extern "C" {
pub fn PQgetline(
conn: *mut PGconn,
buffer: *mut ::std::os::raw::c_char,
length: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQputline(
conn: *mut PGconn,
string: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe 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;
}
unsafe 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;
}
unsafe extern "C" {
pub fn PQendcopy(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQsetnonblocking(conn: *mut PGconn, arg: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQisnonblocking(conn: *const PGconn) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQisthreadsafe() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQping(conninfo: *const ::std::os::raw::c_char) -> PGPing;
}
unsafe 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;
}
unsafe extern "C" {
pub fn PQflush(conn: *mut PGconn) -> ::std::os::raw::c_int;
}
unsafe 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;
}
unsafe extern "C" {
pub fn PQresultStatus(res: *const PGresult) -> ExecStatusType;
}
unsafe extern "C" {
pub fn PQresStatus(status: ExecStatusType) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQresultErrorMessage(res: *const PGresult) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQresultVerboseErrorMessage(
res: *const PGresult,
verbosity: PGVerbosity,
show_context: PGContextVisibility,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQresultErrorField(
res: *const PGresult,
fieldcode: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQntuples(res: *const PGresult) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQnfields(res: *const PGresult) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQbinaryTuples(res: *const PGresult) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQfname(
res: *const PGresult,
field_num: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQfnumber(
res: *const PGresult,
field_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQftable(res: *const PGresult, field_num: ::std::os::raw::c_int) -> Oid;
}
unsafe extern "C" {
pub fn PQftablecol(
res: *const PGresult,
field_num: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQfformat(
res: *const PGresult,
field_num: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQftype(res: *const PGresult, field_num: ::std::os::raw::c_int) -> Oid;
}
unsafe extern "C" {
pub fn PQfsize(res: *const PGresult, field_num: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQfmod(res: *const PGresult, field_num: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQcmdStatus(res: *mut PGresult) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQoidStatus(res: *const PGresult) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQoidValue(res: *const PGresult) -> Oid;
}
unsafe extern "C" {
pub fn PQcmdTuples(res: *mut PGresult) -> *mut ::std::os::raw::c_char;
}
unsafe 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;
}
unsafe 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;
}
unsafe 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;
}
unsafe extern "C" {
pub fn PQnparams(res: *const PGresult) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQparamtype(res: *const PGresult, param_num: ::std::os::raw::c_int) -> Oid;
}
unsafe extern "C" {
pub fn PQdescribePrepared(
conn: *mut PGconn,
stmt: *const ::std::os::raw::c_char,
) -> *mut PGresult;
}
unsafe extern "C" {
pub fn PQdescribePortal(
conn: *mut PGconn,
portal: *const ::std::os::raw::c_char,
) -> *mut PGresult;
}
unsafe extern "C" {
pub fn PQsendDescribePrepared(
conn: *mut PGconn,
stmt: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQsendDescribePortal(
conn: *mut PGconn,
portal: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQclosePrepared(conn: *mut PGconn, stmt: *const ::std::os::raw::c_char)
-> *mut PGresult;
}
unsafe extern "C" {
pub fn PQclosePortal(conn: *mut PGconn, portal: *const ::std::os::raw::c_char)
-> *mut PGresult;
}
unsafe extern "C" {
pub fn PQsendClosePrepared(
conn: *mut PGconn,
stmt: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQsendClosePortal(
conn: *mut PGconn,
portal: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQclear(res: *mut PGresult);
}
unsafe extern "C" {
pub fn PQfreemem(ptr: *mut ::std::os::raw::c_void);
}
unsafe extern "C" {
pub fn PQmakeEmptyPGresult(conn: *mut PGconn, status: ExecStatusType) -> *mut PGresult;
}
unsafe extern "C" {
pub fn PQcopyResult(src: *const PGresult, flags: ::std::os::raw::c_int) -> *mut PGresult;
}
unsafe extern "C" {
pub fn PQsetResultAttrs(
res: *mut PGresult,
numAttributes: ::std::os::raw::c_int,
attDescs: *mut PGresAttDesc,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQresultAlloc(res: *mut PGresult, nBytes: usize) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
pub fn PQresultMemorySize(res: *const PGresult) -> usize;
}
unsafe 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;
}
unsafe 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;
}
unsafe extern "C" {
pub fn PQescapeLiteral(
conn: *mut PGconn,
str_: *const ::std::os::raw::c_char,
len: usize,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQescapeIdentifier(
conn: *mut PGconn,
str_: *const ::std::os::raw::c_char,
len: usize,
) -> *mut ::std::os::raw::c_char;
}
unsafe 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;
}
unsafe extern "C" {
pub fn PQunescapeBytea(
strtext: *const ::std::os::raw::c_uchar,
retbuflen: *mut usize,
) -> *mut ::std::os::raw::c_uchar;
}
unsafe extern "C" {
pub fn PQescapeString(
to: *mut ::std::os::raw::c_char,
from: *const ::std::os::raw::c_char,
length: usize,
) -> usize;
}
unsafe 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;
}
unsafe extern "C" {
pub fn PQprint(fout: *mut FILE, res: *const PGresult, po: *const PQprintOpt);
}
unsafe 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,
);
}
unsafe extern "C" {
pub fn PQprintTuples(
res: *const PGresult,
fout: *mut FILE,
PrintAttNames: ::std::os::raw::c_int,
TerseOutput: ::std::os::raw::c_int,
colWidth: ::std::os::raw::c_int,
);
}
unsafe extern "C" {
pub fn lo_open(
conn: *mut PGconn,
lobjId: Oid,
mode: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn lo_close(conn: *mut PGconn, fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn lo_read(
conn: *mut PGconn,
fd: ::std::os::raw::c_int,
buf: *mut ::std::os::raw::c_char,
len: usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn lo_write(
conn: *mut PGconn,
fd: ::std::os::raw::c_int,
buf: *const ::std::os::raw::c_char,
len: usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn lo_lseek(
conn: *mut PGconn,
fd: ::std::os::raw::c_int,
offset: ::std::os::raw::c_int,
whence: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn lo_lseek64(
conn: *mut PGconn,
fd: ::std::os::raw::c_int,
offset: i64,
whence: ::std::os::raw::c_int,
) -> i64;
}
unsafe extern "C" {
pub fn lo_creat(conn: *mut PGconn, mode: ::std::os::raw::c_int) -> Oid;
}
unsafe extern "C" {
pub fn lo_create(conn: *mut PGconn, lobjId: Oid) -> Oid;
}
unsafe extern "C" {
pub fn lo_tell(conn: *mut PGconn, fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn lo_tell64(conn: *mut PGconn, fd: ::std::os::raw::c_int) -> i64;
}
unsafe extern "C" {
pub fn lo_truncate(
conn: *mut PGconn,
fd: ::std::os::raw::c_int,
len: usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn lo_truncate64(
conn: *mut PGconn,
fd: ::std::os::raw::c_int,
len: i64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn lo_unlink(conn: *mut PGconn, lobjId: Oid) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn lo_import(conn: *mut PGconn, filename: *const ::std::os::raw::c_char) -> Oid;
}
unsafe extern "C" {
pub fn lo_import_with_oid(
conn: *mut PGconn,
filename: *const ::std::os::raw::c_char,
lobjId: Oid,
) -> Oid;
}
unsafe extern "C" {
pub fn lo_export(
conn: *mut PGconn,
lobjId: Oid,
filename: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQlibVersion() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQsocketPoll(
sock: ::std::os::raw::c_int,
forRead: ::std::os::raw::c_int,
forWrite: ::std::os::raw::c_int,
end_time: pg_usec_time_t,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQgetCurrentTimeUSec() -> pg_usec_time_t;
}
unsafe extern "C" {
pub fn PQmblen(
s: *const ::std::os::raw::c_char,
encoding: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQmblenBounded(
s: *const ::std::os::raw::c_char,
encoding: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQdsplen(
s: *const ::std::os::raw::c_char,
encoding: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn PQenv2encoding() -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _PGpromptOAuthDevice {
pub verification_uri: *const ::std::os::raw::c_char,
pub user_code: *const ::std::os::raw::c_char,
pub verification_uri_complete: *const ::std::os::raw::c_char,
pub expires_in: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of _PGpromptOAuthDevice"][::std::mem::size_of::<_PGpromptOAuthDevice>() - 32usize];
["Alignment of _PGpromptOAuthDevice"][::std::mem::align_of::<_PGpromptOAuthDevice>() - 8usize];
["Offset of field: _PGpromptOAuthDevice::verification_uri"]
[::std::mem::offset_of!(_PGpromptOAuthDevice, verification_uri) - 0usize];
["Offset of field: _PGpromptOAuthDevice::user_code"]
[::std::mem::offset_of!(_PGpromptOAuthDevice, user_code) - 8usize];
["Offset of field: _PGpromptOAuthDevice::verification_uri_complete"]
[::std::mem::offset_of!(_PGpromptOAuthDevice, verification_uri_complete) - 16usize];
["Offset of field: _PGpromptOAuthDevice::expires_in"]
[::std::mem::offset_of!(_PGpromptOAuthDevice, expires_in) - 24usize];
};
pub type PGpromptOAuthDevice = _PGpromptOAuthDevice;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PGoauthBearerRequest {
pub openid_configuration: *const ::std::os::raw::c_char,
pub scope: *const ::std::os::raw::c_char,
pub async_: ::std::option::Option<
unsafe extern "C" fn(
conn: *mut PGconn,
request: *mut PGoauthBearerRequest,
altsock: *mut ::std::os::raw::c_int,
) -> PostgresPollingStatusType,
>,
pub cleanup: ::std::option::Option<
unsafe extern "C" fn(conn: *mut PGconn, request: *mut PGoauthBearerRequest),
>,
pub token: *mut ::std::os::raw::c_char,
pub user: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of PGoauthBearerRequest"][::std::mem::size_of::<PGoauthBearerRequest>() - 48usize];
["Alignment of PGoauthBearerRequest"][::std::mem::align_of::<PGoauthBearerRequest>() - 8usize];
["Offset of field: PGoauthBearerRequest::openid_configuration"]
[::std::mem::offset_of!(PGoauthBearerRequest, openid_configuration) - 0usize];
["Offset of field: PGoauthBearerRequest::scope"]
[::std::mem::offset_of!(PGoauthBearerRequest, scope) - 8usize];
["Offset of field: PGoauthBearerRequest::async_"]
[::std::mem::offset_of!(PGoauthBearerRequest, async_) - 16usize];
["Offset of field: PGoauthBearerRequest::cleanup"]
[::std::mem::offset_of!(PGoauthBearerRequest, cleanup) - 24usize];
["Offset of field: PGoauthBearerRequest::token"]
[::std::mem::offset_of!(PGoauthBearerRequest, token) - 32usize];
["Offset of field: PGoauthBearerRequest::user"]
[::std::mem::offset_of!(PGoauthBearerRequest, user) - 40usize];
};
unsafe 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;
}
unsafe extern "C" {
pub fn PQencryptPasswordConn(
conn: *mut PGconn,
passwd: *const ::std::os::raw::c_char,
user: *const ::std::os::raw::c_char,
algorithm: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn PQchangePassword(
conn: *mut PGconn,
user: *const ::std::os::raw::c_char,
passwd: *const ::std::os::raw::c_char,
) -> *mut PGresult;
}
pub type PQauthDataHook_type = ::std::option::Option<
unsafe extern "C" fn(
type_: PGauthData,
conn: *mut PGconn,
data: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
unsafe extern "C" {
pub fn PQsetAuthDataHook(hook: PQauthDataHook_type);
}
unsafe extern "C" {
pub fn PQgetAuthDataHook() -> PQauthDataHook_type;
}
unsafe extern "C" {
pub fn PQdefaultAuthDataHook(
type_: PGauthData,
conn: *mut PGconn,
data: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn pg_char_to_encoding(name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn pg_encoding_to_char(encoding: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
pub fn pg_valid_server_encoding_id(encoding: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
pub type PQsslKeyPassHook_OpenSSL_type = ::std::option::Option<
unsafe extern "C" fn(
buf: *mut ::std::os::raw::c_char,
size: ::std::os::raw::c_int,
conn: *mut PGconn,
) -> ::std::os::raw::c_int,
>;
unsafe extern "C" {
pub fn PQgetSSLKeyPassHook_OpenSSL() -> PQsslKeyPassHook_OpenSSL_type;
}
unsafe extern "C" {
pub fn PQsetSSLKeyPassHook_OpenSSL(hook: PQsslKeyPassHook_OpenSSL_type);
}
unsafe extern "C" {
pub fn PQdefaultSSLKeyPassHook_OpenSSL(
buf: *mut ::std::os::raw::c_char,
size: ::std::os::raw::c_int,
conn: *mut PGconn,
) -> ::std::os::raw::c_int;
}