mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
Add libpq function PQconninfo()
This allows a caller to get back the exact conninfo array that was used to create a connection, including parameters read from the environment. In doing this, restructure how options are copied from the conninfo to the actual connection. Zoltan Boszormenyi and Magnus Hagander
This commit is contained in:
@@ -262,6 +262,9 @@ extern PQconninfoOption *PQconndefaults(void);
|
||||
/* parse connection options in same way as PQconnectdb */
|
||||
extern PQconninfoOption *PQconninfoParse(const char *conninfo, char **errmsg);
|
||||
|
||||
/* return the connection options used by a live connection */
|
||||
extern PQconninfoOption *PQconninfo(PGconn *conn);
|
||||
|
||||
/* free the data structure returned by PQconndefaults() or PQconninfoParse() */
|
||||
extern void PQconninfoFree(PQconninfoOption *connOptions);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user