#ifndef __PGSQL_H__ #define __PGSQL_H__ #include #include #include #include #include #include #include using namespace std; int pgsql_db_connect(const char*host,const char*name,const char*user,const char*pass,long port); int pgsql_exec(const char * format, ... ); const PGresult* pgsql_query(const char * format, ... ); int pgsql_num_rows(const PGresult *res); int pgsql_num_fields(const PGresult *res); map pgsql_fetch_assoc(const PGresult *res, int row); vector pgsql_fetch_row(const PGresult *res, int row); void pgsql_close(); char* pgsql_uitoa(unsigned n, char *s, int radix); #endif /* vi:ts=2 */