1

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 ?

1
  • Have a look at function 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. Commented Sep 27, 2012 at 9:23

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.