I am new to POSTGRES.I want to make a SELECT and list all the columns names and values.
Is there a function in library libpq-fe.h to get the column names of a sql query ?
From Delphi code I use LibPQ and PQfname(SelectHandle, ColumnNr); . It is described in http://www.postgresql.org/docs/9.2/static/libpq-exec.html
PQsetResultAttrs(PGresult *res, int numAttributes, PGresAttDesc *attDescs)- it may be what you're after, but I haven't used postgres from C myself, so not too sure.