38 conninfo =
"dbname = postgres";
52 "SELECT pg_catalog.set_config('search_path', '', false)");
86 res =
PQexec(
conn,
"DECLARE myportal CURSOR FOR select * from pg_database");
105 for (
i = 0;
i < nFields;
i++)
112 for (
j = 0;
j < nFields;
j++)
#define fprintf(file, fmt, msg)
PGconn * PQconnectdb(const char *conninfo)
ConnStatusType PQstatus(const PGconn *conn)
void PQfinish(PGconn *conn)
char * PQerrorMessage(const PGconn *conn)
char * PQgetvalue(const PGresult *res, int tup_num, int field_num)
ExecStatusType PQresultStatus(const PGresult *res)
void PQclear(PGresult *res)
int PQntuples(const PGresult *res)
char * PQfname(const PGresult *res, int field_num)
PGresult * PQexec(PGconn *conn, const char *query)
int PQnfields(const PGresult *res)
static void exit_nicely(PGconn *conn)
int main(int argc, char **argv)