Header And Logo

PostgreSQL
| The world's most advanced open source database.

streamutil.h

Go to the documentation of this file.
00001 #include "libpq-fe.h"
00002 
00003 extern const char *progname;
00004 extern char *connection_string;
00005 extern char *dbhost;
00006 extern char *dbuser;
00007 extern char *dbport;
00008 extern int  dbgetpassword;
00009 
00010 /* Connection kept global so we can disconnect easily */
00011 extern PGconn *conn;
00012 
00013 #define disconnect_and_exit(code)               \
00014     {                                           \
00015     if (conn != NULL) PQfinish(conn);           \
00016     exit(code);                                 \
00017     }
00018 
00019 extern PGconn *GetConnection(void);