X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 77A80D1B182 for ; Mon, 7 Jun 2004 00:34:28 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 28218-09 for ; Mon, 7 Jun 2004 03:34:24 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 302B0D1B16F for ; Mon, 7 Jun 2004 00:34:23 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i573YJoX023546; Sun, 6 Jun 2004 23:34:19 -0400 (EDT) To: L J Bayuk Cc: Bshrivastav@esri.com (Brijesh Shrivastav), pgsql-interfaces@postgresql.org ('pgsql-interfaces@postgresql.org') Subject: Re: Is there a way to describe precision and scale for columns in a s In-reply-to: <200406070044.i570i4LN000718@mindspring.com> References: <200406070044.i570i4LN000718@mindspring.com> Comments: In-reply-to L J Bayuk message dated "Sun, 06 Jun 2004 20:44:04 -0400" Date: Sun, 06 Jun 2004 23:34:19 -0400 Message-ID: <23545.1086579259@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.1 tagged_above=0.0 required=5.0 tests=MAILTO_TO_SPAM_ADDR X-Spam-Level: * X-Archive-Number: 200406/10 X-Sequence-Number: 4938 L J Bayuk writes: > Brijesh Shrivastav wrote: >> It seems I can't get the select column information untill I perform an >> PQexecPrepared(). >> Is there any way around it? > I don't think so. The protocol supports it ("Describe" message on a named > prepared statement, without Bind or Execute), and I assume the backend > would play along, but I don't think libpq has any way to let you do it > in the current release. libpq doesn't currently have any API to let you get at Describe-Statement. This is obviously something to fix. There are actually quite a few aspects of the v3 backend protocol that libpq has no API for as yet. I would like to see someone think about prepared statements and parameters in general, and put forward a coherent proposed API for the whole mess. But short of that, we could accept a solution for this particular issue ... regards, tom lane