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

Re: [HACKERS] Re: [INTERFACES] retrieving varchar size

From: Byron Nikolaidis <byronn(at)insightdist(dot)com>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: hannu(at)trust(dot)ee, daveh(at)insightdist(dot)com, pgsql-hackers(at)postgreSQL(dot)org, pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Re: [INTERFACES] retrieving varchar size
Date: 1998-04-24 02:44:07
Message-ID: 353FFC77.55A58CF5@insightdist.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfaces

Bruce Momjian wrote:

> > The problem with that theory is this.  If the frontend application just
> > executes some random query, such as "select * from table", you really do not
> > know anything about what is coming back. You must rely on the little bit of
> > information the protocol gives you.  In the case of Postgres, it gives you
> > the fieldname, datatype, and size for each column in the result.
> > Unfortunately, for varchar and char(n), the size reports -1.  This is not
> > very helpful for describing the result set.
> >
> > Your above example works fine (in fact we use that already) when you know the
> > table and column name, as in metadata functions such as SQLColumns() in the
> > ODBC driver.
>
> Yep.  We could pass back atttypmod as part of the PGresult.  I can add
> that to the TODO list.  Would that help?

Yes, that would do it!

Thank you for listening to our ravings on this issue.

Byron


In response to

Responses

pgsql-hackers by date

Next:From: Byron NikolaidisDate: 1998-04-24 03:35:40
Subject: Re: ODBC + Delphi (GREAT!) + some little thing//
Previous:From: David GouldDate: 1998-04-24 02:13:18
Subject: Re: [HACKERS] Re: [QUESTIONS] Anything like strftime() for PostgreSQL?

pgsql-interfaces by date

Next:From: Byron NikolaidisDate: 1998-04-24 03:35:40
Subject: Re: ODBC + Delphi (GREAT!) + some little thing//
Previous:From: ggangDate: 1998-04-24 02:42:52
Subject: unsubscribe

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