mirror of
https://github.com/postgres/postgres.git
synced 2025-11-15 03:41:20 +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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user