From: Brett McCormick <brett@funky.chicken.org>
To: Ken J. Wright <ken@ori-ind.com>
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] how to obtain column info
Date: Tue, 10 Nov 1998 21:33:15 -0800 (PST)
Message-ID: <13897.8603.607626.743672@eidolon.muppetlabs.com> (raw)
In-Reply-To: <3.0.1.32.19981110163802.007b72f0@ori-ind.com>
References: <3.0.1.32.19981110163802.007b72f0@ori-ind.com>
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
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: brett@funky.chicken.org, ken@ori-ind.com
Subject: Re: [INTERFACES] how to obtain column info
In-Reply-To: <13897.8603.607626.743672@eidolon.muppetlabs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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