Thread: Re: How to incorporate exec sql describe select list

Re: How to incorporate exec sql describe select list

From
Christoph Haller
Date:
>
> I have requirement where for a select statement i need dbms column
> information like data type,precision,scale, length etc
> In Oracle using "exec sql describe select list ..." it is possible
> to obtain the above information. In postgres descriptor is
> avaialble only after fetching from the cursor. This is not
> possbile through ecpg programming. But i was thinking whether it
> is possible to do with libpq programming. If so can anyone send me
> pointer to the code.
>
Refer to libpq - C Library within the Client Interfaces section.
Under Command Execution Functions there is a subsection
about Retrieving SELECT Result Information.
This should be what you were asking for.
There is also some C code to refer to. Have a look at the
Example Programs.

Regards, Christoph