Thread: create tables in empty database (libpq)

create tables in empty database (libpq)

From
Henk Jan Barendregt
Date:
Hello,

I'm trying to create tables with libpq in an empty database.

The database named 'cash' is created with 'createdb cash'.
Then connecting with libpq is ok but i can't execute any
queries. After procssing a query PQresultStatus gives the
error message :
   PQresultStatus() -- pointer to PQresult is null

Tying to disconnect the database with PQfinish gives a
segmentation fault.

Any suggestions how to fix this ?

Thanks in advance,

Henk Jan