X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E3309474E5C for ; Wed, 12 Feb 2003 03:54:19 -0500 (EST) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by postgresql.org (Postfix) with SMTP id 7EA35474E44 for ; Wed, 12 Feb 2003 03:54:18 -0500 (EST) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Wed Feb 12 09:54:18 2003 +0100 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id JAA20908; Wed, 12 Feb 2003 09:54:17 +0100 (MET) Message-ID: <3E4A0BB9.FDC4A67B@rodos.fzk.de> Date: Wed, 12 Feb 2003 09:54:17 +0100 From: Christoph Haller X-Mailer: Mozilla 4.77 [en] (X11; U; HP-UX B.10.20 9000/780) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Cc: prashanth_kamath1@rediffmail.com Subject: Re: How to incorporate exec sql describe select list Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/236 X-Sequence-Number: 11634 > > 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