1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Added in PQconnectdb() function

Submitted by: wieck@sapserv.debis.de (Jan Wieck)
This commit is contained in:
Marc G. Fournier
1996-11-09 10:39:54 +00:00
parent 7ee9464bc1
commit 4aa1734f36
6 changed files with 549 additions and 41 deletions

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: libpq-fe.h,v 1.9 1996/11/04 04:00:56 momjian Exp $
* $Id: libpq-fe.h,v 1.10 1996/11/09 10:39:54 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -146,8 +146,31 @@ struct _PQprintOpt {
typedef struct _PQprintOpt PQprintOpt;
/* ----------------
* Structure for the conninfo parameter definitions of PQconnectdb()
* ----------------
*/
struct _PQconninfoOption {
char *keyword; /* The keyword of the option */
char *environ; /* Fallback environment variable name */
char *compiled; /* Fallback compiled in default value */
char *val; /* Options value */
char *label; /* Label for field in connect dialog */
char *dispchar; /* Character to display for this field */
/* in a connect dialog. Values are: */
/* "" Display entered value as is */
/* "*" Password field - hide value */
/* "D" Debug options - don't */
/* create a field by default */
int dispsize; /* Field size in characters for dialog */
};
typedef struct _PQconninfoOption PQconninfoOption;
/* === in fe-connect.c === */
/* make a new client connection to the backend */
extern PGconn* PQconnectdb(const char* conninfo);
extern PQconninfoOption *PQconndefaults();
extern PGconn* PQsetdb(const char* pghost, const char* pgport, const char* pgoptions,
const char* pgtty, const char* dbName);
/* close the current connection and free the PGconn data structure */
@@ -157,6 +180,7 @@ extern void PQfinish(PGconn* conn);
extern void PQreset(PGconn* conn);
extern char* PQdb(PGconn* conn);
extern char* PQuser(PGconn* conn);
extern char* PQhost(PGconn* conn);
extern char* PQoptions(PGconn* conn);
extern char* PQport(PGconn* conn);