Received: from eidolon.muppetlabs.com (muppetlabs.com [206.191.168.254]) by hub.org (8.9.1/8.9.1) with ESMTP id AAA00555 for ; Wed, 11 Nov 1998 00:33:21 -0500 (EST) (envelope-from brett@eidolon.muppetlabs.com) Received: (from brett@localhost) by eidolon.muppetlabs.com (8.9.1a/8.9.1) id VAA19576; Tue, 10 Nov 1998 21:33:15 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <13897.8603.607626.743672@eidolon.muppetlabs.com> Date: Tue, 10 Nov 1998 21:33:15 -0800 (PST) From: Brett McCormick To: "Ken J. Wright" Cc: pgsql-interfaces@postgreSQL.org Subject: Re: [INTERFACES] how to obtain column info In-Reply-To: <3.0.1.32.19981110163802.007b72f0@ori-ind.com> References: <3.0.1.32.19981110163802.007b72f0@ori-ind.com> X-Mailer: VM 6.62 under Emacs 19.34.2 If you just want to know whether or not to quote it, just see if it has any non-numerical characters. If so, quote it, otherwise, leave it alone. Seems like their would be a loss in performace if you checked the types instead of just quoting everything (which works fine). On Tue, 10 November 1998, at 16:38:02, Ken J. Wright wrote: > With libpq, how do you obtain column info (like type) for a table *before* > returning a result set? For instance, knowing the column type before > constructing an insert statement. A date will need quotes, a number won't, > a string will, etc. > > Thanks, > > Ken >