Re: libpq - description of columns - Mailing list pgsql-interfaces

From Ron Johnson
Subject Re: libpq - description of columns
Date
Msg-id 1022169833.22629.12.camel@rebel
Whole thread Raw
In response to Re: libpq - description of columns  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-interfaces
On Thu, 2002-05-23 at 09:26, Tom Lane wrote:
> Christian Gregoire <cgregoir99@yahoo.com> writes:
> > Using '\d TABLENAME', psql gives me
> >   character(15)
> > for a column, when libpq API PQfsize returns -1 for
> > the same column, whereas -1 should only indicate
> > fields with variable size (like TEXT i guess). Any
> > idea ?
> 
> Yes, char(N) is considered a variable-length type.  (Think about
> multibyte encodings to see why this must be so.)  psql is looking

So it is only to the "user" that pg says "char() is fixed-length"?

-- 
+---------------------------------------------------------+
| Ron Johnson, Jr.        Home: ron.l.johnson@cox.net     |
| Jefferson, LA  USA      http://ronandheather.dhs.org:81 |
|                                                         |
| "I have created a government of whirled peas..."        |
|   Maharishi Mahesh Yogi, 12-May-2002,                   |
!   CNN, Larry King Live                                  |
+---------------------------------------------------------+



pgsql-interfaces by date:

Previous
From: Tom Lane
Date:
Subject: Re: libpq - description of columns
Next
From: Denis Cartier Millon
Date:
Subject: if exists / where exisyts....