pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How to incorporate exec sql describe select list ( available in sql server in postgres)
2+ messages / 2 participants
[nested] [flat]

* How to incorporate exec sql describe select list ( available in sql server in postgres)
@ 2003-02-12 06:23 Prashanth - Kamath <prashanth_kamath1@rediffmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Prashanth - Kamath @ 2003-02-12 06:23 UTC (permalink / raw)
  To: pgsql-sql

Hi,
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.

Regards
Prashanth Kamath




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: How to incorporate exec sql describe select list
@ 2003-02-12 08:54 Christoph Haller <ch@rodos.fzk.de>
  0 siblings, 0 replies; 2+ messages in thread

From: Christoph Haller @ 2003-02-12 08:54 UTC (permalink / raw)
  To: pgsql-sql; +Cc: prashanth_kamath1@rediffmail.com

>
> 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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2003-02-12 08:54 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-02-12 06:23 How to incorporate exec sql describe select list ( available in sql server in postgres) Prashanth - Kamath <prashanth_kamath1@rediffmail.com>
2003-02-12 08:54 Re: How to incorporate exec sql describe select list Christoph Haller <ch@rodos.fzk.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox