ANSI-C PostgresSQL example using libpq