database.c
changeset 27 81a574d60c15
parent 9 c3fecc82ade6
child 29 7abf6146898e
equal deleted inserted replaced
26:d227047a3e88 27:81a574d60c15
     9 #include <libpq-fe.h>
     9 #include <libpq-fe.h>
    10 
    10 
    11 int main (int argc, char **argv)
    11 int main (int argc, char **argv)
    12 {
    12 {
    13     char *conninfo;
    13     char *conninfo;
       
    14 
    14     PGconn *conn;
    15     PGconn *conn;
       
    16 
    15     PGresult *res;
    17     PGresult *res;
       
    18 
    16     int nFields;
    19     int nFields;
       
    20 
    17     int i;
    21     int i;
       
    22 
    18     int j;
    23     int j;
    19 
    24 
    20     conninfo = "dbname=lightintron";
    25     conninfo = "dbname=lightintron";
    21 
    26 
    22     conn = PQconnectdb (conninfo);
    27     conn = PQconnectdb (conninfo);