Get column list from Postgres Query
I want to get the names, the type and the length of all columns in a postgres query using c-api calls.
For example from:
SELECT customers.id, customers.name, transaction.date, transaction.amount FROM customers, transactions
I must get:
customers.id,
customers.name,
transaction.date,
transaction.amount
How can I achieve this??
Thanks in advance
___________________________________
Panos Germanis
Software Engineer
pgermanis@gmail.com
mob: 6944339998
"Peace cannot be kept by force. It can only be achieved by understanding."
(Albert Einstein)
Attachments:
On Feb 19, 2011, at 4:42 PM, PANAGIOTIS GERMANIS wrote:
want to get the names, the type and the length of all columns in a postgres query using c-api calls.
This documented pretty clearly in the libpq docs:
<http://www.postgresql.org/docs/9.0/static/libpq.html>
--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice