mirror of
https://github.com/postgres/postgres.git
synced 2025-10-22 14:32:25 +03:00
libpq: Remove PQservice()
This routine has been introduced as a shortcut to be able to retrieve a service name from an active connection, for psql. Per discussion, and as it is only used by psql, let's remove it to not clutter the libpq API more than necessary. The logic in psql is replaced by lookups of PQconninfoOption for the active connection, instead, updated each time the variables are synced by psql, the prompt shortcut relying on the variable synced. Reported-by: Noah Misch <noah@leadboat.com> Discussion: https://postgr.es/m/20250706161319.c1.nmisch@google.com Backpatch-through: 18
This commit is contained in:
@@ -205,9 +205,8 @@ PQcancelFinish 202
|
||||
PQsocketPoll 203
|
||||
PQsetChunkedRowsMode 204
|
||||
PQgetCurrentTimeUSec 205
|
||||
PQservice 206
|
||||
PQsetAuthDataHook 207
|
||||
PQgetAuthDataHook 208
|
||||
PQdefaultAuthDataHook 209
|
||||
PQfullProtocolVersion 210
|
||||
appendPQExpBufferVA 211
|
||||
PQsetAuthDataHook 206
|
||||
PQgetAuthDataHook 207
|
||||
PQdefaultAuthDataHook 208
|
||||
PQfullProtocolVersion 209
|
||||
appendPQExpBufferVA 210
|
||||
|
@@ -7461,14 +7461,6 @@ PQdb(const PGconn *conn)
|
||||
return conn->dbName;
|
||||
}
|
||||
|
||||
char *
|
||||
PQservice(const PGconn *conn)
|
||||
{
|
||||
if (!conn)
|
||||
return NULL;
|
||||
return conn->pgservice;
|
||||
}
|
||||
|
||||
char *
|
||||
PQuser(const PGconn *conn)
|
||||
{
|
||||
|
@@ -400,7 +400,6 @@ extern int PQrequestCancel(PGconn *conn);
|
||||
|
||||
/* Accessor functions for PGconn objects */
|
||||
extern char *PQdb(const PGconn *conn);
|
||||
extern char *PQservice(const PGconn *conn);
|
||||
extern char *PQuser(const PGconn *conn);
|
||||
extern char *PQpass(const PGconn *conn);
|
||||
extern char *PQhost(const PGconn *conn);
|
||||
|
Reference in New Issue
Block a user