Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] how to obtain column info

From: Brett McCormick <brett(at)funky(dot)chicken(dot)org>
To: "Ken J(dot) Wright" <ken(at)ori-ind(dot)com>
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] how to obtain column info
Date: 1998-11-11 05:33:15
Message-ID: 13897.8603.607626.743672@eidolon.muppetlabs.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
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
> 

In response to

pgsql-interfaces by date

Next:From: Herouth MaozDate: 1998-11-11 09:56:29
Subject: Re: [INTERFACES] Determine data type of columns
Previous:From: Cary B. O'BrienDate: 1998-11-11 01:34:47
Subject: Re: [INTERFACES] how to obtain column info

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group