2010-09-20 22:08:53 +02:00
|
|
|
# src/interfaces/libpq/exports.txt
|
2004-10-16 22:10:57 +02:00
|
|
|
# Functions to be exported by libpq DLLs
|
|
|
|
PQconnectdb 1
|
|
|
|
PQsetdbLogin 2
|
|
|
|
PQconndefaults 3
|
|
|
|
PQfinish 4
|
|
|
|
PQreset 5
|
|
|
|
PQrequestCancel 6
|
|
|
|
PQdb 7
|
|
|
|
PQuser 8
|
|
|
|
PQpass 9
|
|
|
|
PQhost 10
|
|
|
|
PQport 11
|
|
|
|
PQtty 12
|
|
|
|
PQoptions 13
|
|
|
|
PQstatus 14
|
|
|
|
PQerrorMessage 15
|
|
|
|
PQsocket 16
|
|
|
|
PQbackendPID 17
|
|
|
|
PQtrace 18
|
|
|
|
PQuntrace 19
|
|
|
|
PQsetNoticeProcessor 20
|
|
|
|
PQexec 21
|
|
|
|
PQnotifies 22
|
|
|
|
PQsendQuery 23
|
|
|
|
PQgetResult 24
|
|
|
|
PQisBusy 25
|
|
|
|
PQconsumeInput 26
|
|
|
|
PQgetline 27
|
|
|
|
PQputline 28
|
|
|
|
PQgetlineAsync 29
|
|
|
|
PQputnbytes 30
|
|
|
|
PQendcopy 31
|
|
|
|
PQfn 32
|
|
|
|
PQresultStatus 33
|
|
|
|
PQntuples 34
|
|
|
|
PQnfields 35
|
|
|
|
PQbinaryTuples 36
|
|
|
|
PQfname 37
|
|
|
|
PQfnumber 38
|
|
|
|
PQftype 39
|
|
|
|
PQfsize 40
|
|
|
|
PQfmod 41
|
|
|
|
PQcmdStatus 42
|
|
|
|
PQoidStatus 43
|
|
|
|
PQcmdTuples 44
|
|
|
|
PQgetvalue 45
|
|
|
|
PQgetlength 46
|
|
|
|
PQgetisnull 47
|
|
|
|
PQclear 48
|
|
|
|
PQmakeEmptyPGresult 49
|
|
|
|
PQprint 50
|
|
|
|
PQdisplayTuples 51
|
|
|
|
PQprintTuples 52
|
|
|
|
lo_open 53
|
|
|
|
lo_close 54
|
|
|
|
lo_read 55
|
|
|
|
lo_write 56
|
|
|
|
lo_lseek 57
|
|
|
|
lo_creat 58
|
|
|
|
lo_tell 59
|
|
|
|
lo_unlink 60
|
|
|
|
lo_import 61
|
|
|
|
lo_export 62
|
|
|
|
pgresStatus 63
|
|
|
|
PQmblen 64
|
|
|
|
PQresultErrorMessage 65
|
|
|
|
PQresStatus 66
|
|
|
|
termPQExpBuffer 67
|
|
|
|
appendPQExpBufferChar 68
|
|
|
|
initPQExpBuffer 69
|
|
|
|
resetPQExpBuffer 70
|
|
|
|
PQoidValue 71
|
|
|
|
PQclientEncoding 72
|
|
|
|
PQenv2encoding 73
|
|
|
|
appendBinaryPQExpBuffer 74
|
|
|
|
appendPQExpBufferStr 75
|
|
|
|
destroyPQExpBuffer 76
|
|
|
|
createPQExpBuffer 77
|
|
|
|
PQconninfoFree 78
|
|
|
|
PQconnectPoll 79
|
|
|
|
PQconnectStart 80
|
|
|
|
PQflush 81
|
|
|
|
PQisnonblocking 82
|
|
|
|
PQresetPoll 83
|
|
|
|
PQresetStart 84
|
|
|
|
PQsetClientEncoding 85
|
|
|
|
PQsetnonblocking 86
|
|
|
|
PQfreeNotify 87
|
|
|
|
PQescapeString 88
|
|
|
|
PQescapeBytea 89
|
|
|
|
printfPQExpBuffer 90
|
|
|
|
appendPQExpBuffer 91
|
|
|
|
pg_encoding_to_char 92
|
|
|
|
pg_utf_mblen 93
|
|
|
|
PQunescapeBytea 94
|
|
|
|
PQfreemem 95
|
|
|
|
PQtransactionStatus 96
|
|
|
|
PQparameterStatus 97
|
|
|
|
PQprotocolVersion 98
|
|
|
|
PQsetErrorVerbosity 99
|
|
|
|
PQsetNoticeReceiver 100
|
|
|
|
PQexecParams 101
|
|
|
|
PQsendQueryParams 102
|
|
|
|
PQputCopyData 103
|
|
|
|
PQputCopyEnd 104
|
|
|
|
PQgetCopyData 105
|
|
|
|
PQresultErrorField 106
|
|
|
|
PQftable 107
|
|
|
|
PQftablecol 108
|
|
|
|
PQfformat 109
|
|
|
|
PQexecPrepared 110
|
|
|
|
PQsendQueryPrepared 111
|
|
|
|
PQdsplen 112
|
|
|
|
PQserverVersion 113
|
|
|
|
PQgetssl 114
|
|
|
|
pg_char_to_encoding 115
|
|
|
|
pg_valid_server_encoding 116
|
2019-10-10 20:24:56 +02:00
|
|
|
pqsignal 117
|
2004-10-19 00:00:42 +02:00
|
|
|
PQprepare 118
|
|
|
|
PQsendPrepare 119
|
2004-10-31 01:11:27 +02:00
|
|
|
PQgetCancel 120
|
|
|
|
PQfreeCancel 121
|
|
|
|
PQcancel 122
|
2005-06-13 04:26:53 +02:00
|
|
|
lo_create 123
|
2005-10-21 17:21:21 +02:00
|
|
|
PQinitSSL 124
|
|
|
|
PQregisterThreadLock 125
|
Modify libpq's string-escaping routines to be aware of encoding considerations
and standard_conforming_strings. The encoding changes are needed for proper
escaping in multibyte encodings, as per the SQL-injection vulnerabilities
noted in CVE-2006-2313 and CVE-2006-2314. Concurrent fixes are being applied
to the server to ensure that it rejects queries that may have been corrupted
by attempted SQL injection, but this merely guarantees that unpatched clients
will fail rather than allow injection. An actual fix requires changing the
client-side code. While at it we have also fixed these routines to understand
about standard_conforming_strings, so that the upcoming changeover to SQL-spec
string syntax can be somewhat transparent to client code.
Since the existing API of PQescapeString and PQescapeBytea provides no way to
inform them which settings are in use, these functions are now deprecated in
favor of new functions PQescapeStringConn and PQescapeByteaConn. The new
functions take the PGconn to which the string will be sent as an additional
parameter, and look inside the connection structure to determine what to do.
So as to provide some functionality for clients using the old functions,
libpq stores the latest encoding and standard_conforming_strings values
received from the backend in static variables, and the old functions consult
these variables. This will work reliably in clients using only one Postgres
connection at a time, or even multiple connections if they all use the same
encoding and string syntax settings; which should cover many practical
scenarios.
Clients that use homebrew escaping methods, such as PHP's addslashes()
function or even hardwired regexp substitution, will require extra effort
to fix :-(. It is strongly recommended that such code be replaced by use of
PQescapeStringConn/PQescapeByteaConn if at all feasible.
2006-05-21 22:19:23 +02:00
|
|
|
PQescapeStringConn 126
|
|
|
|
PQescapeByteaConn 127
|
|
|
|
PQencryptPassword 128
|
2006-05-24 00:13:19 +02:00
|
|
|
PQisthreadsafe 129
|
2006-05-29 00:42:05 +02:00
|
|
|
enlargePQExpBuffer 130
|
2006-08-18 21:52:39 +02:00
|
|
|
PQnparams 131
|
|
|
|
PQparamtype 132
|
|
|
|
PQdescribePrepared 133
|
|
|
|
PQdescribePortal 134
|
|
|
|
PQsendDescribePrepared 135
|
|
|
|
PQsendDescribePortal 136
|
2007-03-03 20:52:47 +01:00
|
|
|
lo_truncate 137
|
2007-07-08 19:11:51 +02:00
|
|
|
PQconnectionUsedPassword 138
|
2007-10-13 22:18:42 +02:00
|
|
|
pg_valid_server_encoding_id 139
|
2007-12-09 20:01:40 +01:00
|
|
|
PQconnectionNeedsPassword 140
|
2008-09-17 06:31:08 +02:00
|
|
|
lo_import_with_oid 141
|
|
|
|
PQcopyResult 142
|
|
|
|
PQsetResultAttrs 143
|
|
|
|
PQsetvalue 144
|
|
|
|
PQresultAlloc 145
|
|
|
|
PQregisterEventProc 146
|
|
|
|
PQinstanceData 147
|
|
|
|
PQsetInstanceData 148
|
|
|
|
PQresultInstanceData 149
|
|
|
|
PQresultSetInstanceData 150
|
2008-09-19 22:06:13 +02:00
|
|
|
PQfireResultCreateEvents 151
|
2008-09-22 15:55:14 +02:00
|
|
|
PQconninfoParse 152
|
2009-03-31 03:41:27 +02:00
|
|
|
PQinitOpenSSL 153
|
2010-01-21 15:58:53 +01:00
|
|
|
PQescapeLiteral 154
|
|
|
|
PQescapeIdentifier 155
|
2010-01-28 07:28:26 +01:00
|
|
|
PQconnectdbParams 156
|
|
|
|
PQconnectStartParams 157
|
2010-11-25 19:09:38 +01:00
|
|
|
PQping 158
|
|
|
|
PQpingParams 159
|
2010-12-22 14:23:56 +01:00
|
|
|
PQlibVersion 160
|
2012-08-02 19:10:30 +02:00
|
|
|
PQsetSingleRowMode 161
|
2012-10-07 01:36:48 +02:00
|
|
|
lo_lseek64 162
|
|
|
|
lo_tell64 163
|
|
|
|
lo_truncate64 164
|
2012-11-30 07:09:18 +01:00
|
|
|
PQconninfo 165
|
2015-02-03 18:57:52 +01:00
|
|
|
PQsslInUse 166
|
|
|
|
PQsslStruct 167
|
2015-11-07 22:13:49 +01:00
|
|
|
PQsslAttributeNames 168
|
2015-02-03 18:57:52 +01:00
|
|
|
PQsslAttribute 169
|
2015-09-05 17:58:20 +02:00
|
|
|
PQsetErrorContextVisibility 170
|
2016-04-03 18:24:54 +02:00
|
|
|
PQresultVerboseErrorMessage 171
|
2017-05-03 10:19:07 +02:00
|
|
|
PQencryptPasswordConn 172
|
2018-09-12 00:45:02 +02:00
|
|
|
PQresultMemorySize 173
|
2018-11-19 18:34:12 +01:00
|
|
|
PQhostaddr 174
|
GSSAPI encryption support
On both the frontend and backend, prepare for GSSAPI encryption
support by moving common code for error handling into a separate file.
Fix a TODO for handling multiple status messages in the process.
Eliminate the OIDs, which have not been needed for some time.
Add frontend and backend encryption support functions. Keep the
context initiation for authentication-only separate on both the
frontend and backend in order to avoid concerns about changing the
requested flags to include encryption support.
In postmaster, pull GSSAPI authorization checking into a shared
function. Also share the initiator name between the encryption and
non-encryption codepaths.
For HBA, add "hostgssenc" and "hostnogssenc" entries that behave
similarly to their SSL counterparts. "hostgssenc" requires either
"gss", "trust", or "reject" for its authentication.
Similarly, add a "gssencmode" parameter to libpq. Supported values are
"disable", "require", and "prefer". Notably, negotiation will only be
attempted if credentials can be acquired. Move credential acquisition
into its own function to support this behavior.
Add a simple pg_stat_gssapi view similar to pg_stat_ssl, for monitoring
if GSSAPI authentication was used, what principal was used, and if
encryption is being used on the connection.
Finally, add documentation for everything new, and update existing
documentation on connection security.
Thanks to Michael Paquier for the Windows fixes.
Author: Robbie Harwood, with changes to the read/write functions by me.
Reviewed in various forms and at different times by: Michael Paquier,
Andres Freund, David Steele.
Discussion: https://www.postgresql.org/message-id/flat/jlg1tgq1ktm.fsf@thriss.redhat.com
2019-04-03 21:02:33 +02:00
|
|
|
PQgssEncInUse 175
|
|
|
|
PQgetgssctx 176
|
2020-05-17 01:44:49 +02:00
|
|
|
PQsetSSLKeyPassHook_OpenSSL 177
|
|
|
|
PQgetSSLKeyPassHook_OpenSSL 178
|
|
|
|
PQdefaultSSLKeyPassHook_OpenSSL 179
|