The additional packaging footprint of the OAuth Curl dependency, as well as the existence of libcurl in the address space even if OAuth isn't ever used by a client, has raised some concerns. Split off this dependency into a separate loadable module called libpq-oauth. When configured using --with-libcurl, libpq.so searches for this new module via dlopen(). End users may choose not to install the libpq-oauth module, in which case the default flow is disabled. For static applications using libpq.a, the libpq-oauth staticlib is a mandatory link-time dependency for --with-libcurl builds. libpq.pc has been updated accordingly. The default flow relies on some libpq internals. Some of these can be safely duplicated (such as the SIGPIPE handlers), but others need to be shared between libpq and libpq-oauth for thread-safety. To avoid exporting these internals to all libpq clients forever, these dependencies are instead injected from the libpq side via an initialization function. This also lets libpq communicate the offsets of PGconn struct members to libpq-oauth, so that we can function without crashing if the module on the search path came from a different build of Postgres. (A minor-version upgrade could swap the libpq-oauth module out from under a long-running libpq client before it does its first load of the OAuth flow.) This ABI is considered "private". The module has no SONAME or version symlinks, and it's named libpq-oauth-<major>.so to avoid mixing and matching across Postgres versions. (Future improvements may promote this "OAuth flow plugin" to a first-class concept, at which point we would need a public API to replace this anyway.) Additionally, NLS support for error messages in b3f0be788a was incomplete, because the new error macros weren't being scanned by xgettext. Fix that now. Per request from Tom Lane and Bruce Momjian. Based on an initial patch by Daniel Gustafsson, who also contributed docs changes. The "bare" dlopen() concept came from Thomas Munro. Many people reviewed the design and implementation; thank you! Co-authored-by: Daniel Gustafsson <daniel@yesql.se> Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Christoph Berg <myon@debian.org> Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Reviewed-by: Jelte Fennema-Nio <postgres@jeltef.nl> Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Reviewed-by: Wolfgang Walther <walther@technowledgy.de> Discussion: https://postgr.es/m/641687.1742360249%40sss.pgh.pa.us
214 lines
6.2 KiB
Plaintext
214 lines
6.2 KiB
Plaintext
# src/interfaces/libpq/exports.txt
|
|
# 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
|
|
pqsignal 117
|
|
PQprepare 118
|
|
PQsendPrepare 119
|
|
PQgetCancel 120
|
|
PQfreeCancel 121
|
|
PQcancel 122
|
|
lo_create 123
|
|
PQinitSSL 124
|
|
PQregisterThreadLock 125
|
|
PQescapeStringConn 126
|
|
PQescapeByteaConn 127
|
|
PQencryptPassword 128
|
|
PQisthreadsafe 129
|
|
enlargePQExpBuffer 130
|
|
PQnparams 131
|
|
PQparamtype 132
|
|
PQdescribePrepared 133
|
|
PQdescribePortal 134
|
|
PQsendDescribePrepared 135
|
|
PQsendDescribePortal 136
|
|
lo_truncate 137
|
|
PQconnectionUsedPassword 138
|
|
pg_valid_server_encoding_id 139
|
|
PQconnectionNeedsPassword 140
|
|
lo_import_with_oid 141
|
|
PQcopyResult 142
|
|
PQsetResultAttrs 143
|
|
PQsetvalue 144
|
|
PQresultAlloc 145
|
|
PQregisterEventProc 146
|
|
PQinstanceData 147
|
|
PQsetInstanceData 148
|
|
PQresultInstanceData 149
|
|
PQresultSetInstanceData 150
|
|
PQfireResultCreateEvents 151
|
|
PQconninfoParse 152
|
|
PQinitOpenSSL 153
|
|
PQescapeLiteral 154
|
|
PQescapeIdentifier 155
|
|
PQconnectdbParams 156
|
|
PQconnectStartParams 157
|
|
PQping 158
|
|
PQpingParams 159
|
|
PQlibVersion 160
|
|
PQsetSingleRowMode 161
|
|
lo_lseek64 162
|
|
lo_tell64 163
|
|
lo_truncate64 164
|
|
PQconninfo 165
|
|
PQsslInUse 166
|
|
PQsslStruct 167
|
|
PQsslAttributeNames 168
|
|
PQsslAttribute 169
|
|
PQsetErrorContextVisibility 170
|
|
PQresultVerboseErrorMessage 171
|
|
PQencryptPasswordConn 172
|
|
PQresultMemorySize 173
|
|
PQhostaddr 174
|
|
PQgssEncInUse 175
|
|
PQgetgssctx 176
|
|
PQsetSSLKeyPassHook_OpenSSL 177
|
|
PQgetSSLKeyPassHook_OpenSSL 178
|
|
PQdefaultSSLKeyPassHook_OpenSSL 179
|
|
PQenterPipelineMode 180
|
|
PQexitPipelineMode 181
|
|
PQpipelineSync 182
|
|
PQpipelineStatus 183
|
|
PQsetTraceFlags 184
|
|
PQmblenBounded 185
|
|
PQsendFlushRequest 186
|
|
PQconnectionUsedGSSAPI 187
|
|
PQclosePrepared 188
|
|
PQclosePortal 189
|
|
PQsendClosePrepared 190
|
|
PQsendClosePortal 191
|
|
PQchangePassword 192
|
|
PQsendPipelineSync 193
|
|
PQcancelBlocking 194
|
|
PQcancelStart 195
|
|
PQcancelCreate 196
|
|
PQcancelPoll 197
|
|
PQcancelStatus 198
|
|
PQcancelSocket 199
|
|
PQcancelErrorMessage 200
|
|
PQcancelReset 201
|
|
PQcancelFinish 202
|
|
PQsocketPoll 203
|
|
PQsetChunkedRowsMode 204
|
|
PQgetCurrentTimeUSec 205
|
|
PQservice 206
|
|
PQsetAuthDataHook 207
|
|
PQgetAuthDataHook 208
|
|
PQdefaultAuthDataHook 209
|
|
PQfullProtocolVersion 210
|
|
appendPQExpBufferVA 211
|