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 18EE7D1B491 for ; Tue, 8 Jun 2004 21:18:39 -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 70767-05 for ; Wed, 9 Jun 2004 00:18:22 +0000 (GMT) Received: from mclean.mail.mindspring.net (mclean.mail.mindspring.net [207.69.200.57]) by svr1.postgresql.org (Postfix) with ESMTP id 1AD52D1BB23 for ; Tue, 8 Jun 2004 21:17:16 -0300 (ADT) Received: from sdn-ap-007njpennp0249.dialsprint.net ([63.185.192.249] helo=mindspring.com) by mclean.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1BXqmA-0005Fp-00; Tue, 08 Jun 2004 20:17:07 -0400 Received: (from lbayuk@localhost) by mindspring.com (8.12.10/8.12.10) id i5908J7O000262; Tue, 8 Jun 2004 20:08:20 -0400 From: L J Bayuk Message-Id: <200406090008.i5908J7O000262@mindspring.com> Subject: Re: Is there a way to describe precision and scale To: Bshrivastav@esri.com (Brijesh Shrivastav) Date: Tue, 8 Jun 2004 20:08:19 -0400 (EDT) Cc: pgsql-interfaces@postgresql.org In-Reply-To: <491DC5F3D279CD4EB4B157DDD62237F401ADE475@zipwire.esri.com> from "Brijesh Shrivastav" at Jun 07, 2004 05:52:11 PM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.1 tagged_above=0.0 required=5.0 tests=FROM_ENDS_IN_NUMS, RCVD_IN_NJABL, RCVD_IN_SORBS X-Spam-Level: * X-Archive-Number: 200406/16 X-Sequence-Number: 4944 Brijesh Shrivastav wrote: > > Thanks for the comments. They were very helpful. > > However, I am still not sure about the second problem > i.e. of describing the prepared statement. Does some > other api exposes it? Can I use some sql command to get > around it (I couldn't find any)? any other ideas? Since libpq doesn't expose it, no API based on libpq will let you at it. There are a few non-libpq interfaces, but I doubt any have this advanced feature. My pgin.tcl doesn't. If your prepared query has a parameter which you can use to efficiently select 0 (or a small number of rows), you might be able to use that as a 'dummy' query just to get column information. This is similar to the trick of using "SELECT ... LIMIT 0" to get an empty result set just so you can look at the column info.