Bruce Momjian wrote:
> 
> > > We have a new atttypmod field that holds the length for the column as
> > > defined at table-creation time for char() and varchar().  Is that the
> > > number you want?
> > >
> > > --
> > > Bruce Momjian
> > > maillist@candle.pha.pa.us
> >
> >
> > for varchar() and also for the datatype text it would be
> > nice to know the actual length. If this is not possible,
> > then the length at creation time is still better than -1.
> 
> If you use binary cursors, you can use VARSIZE and VARDATA to see the
> size and data for a string type.
> 
> --
> Bruce Momjian
> maillist@candle.pha.pa.us

For the perl interface (DBD-Pg) I can not use cursors at all,
because they can not be nested.

Edmund
-- 
Edmund Mergl          mailto:E.Mergl@bawue.de
Im Haldenhau 9        http://www.bawue.de/~mergl
70565 Stuttgart       fon: +49 711 747503
Germany               gsm: +49 171 2645325

Sun, 15 Feb 1998 07:46:35 +0100
Edmund Mergl <E.Mergl@bawue.de>
Re: [HACKERS] wishlist: PQfsize
Hi all,

I would like to add the following item to the 
wishlist:

currently the libpq-function PQfsize returns the 
size in bytes of the field with the given field-
index. If the field is a variable-length field, 
PQfsize returns -1.

In general as well as for some internal functionality
of the perl interface it would be useful, if PQfsize
would return the number of bytes even for variable-
length fields.

Edmund
-- 
Edmund Mergl       mailto:E.Mergl@bawue.de
Im Haldenhau 9     http://www.bawue.de/~mergl
70565 Stuttgart    fon: +49 711 747503
Germany            gsm: +49 171 2645325

Sun, 15 Feb 1998 09:34:05 +0100
Edmund Mergl <E.Mergl@bawue.de>
wishlist: PQfsize
> 
> Hi all,
> 
> I would like to add the following item to the 
> wishlist:
> 
> currently the libpq-function PQfsize returns the 
> size in bytes of the field with the given field-
> index. If the field is a variable-length field, 
> PQfsize returns -1.
> 
> In general as well as for some internal functionality
> of the perl interface it would be useful, if PQfsize
> would return the number of bytes even for variable-
> length fields.

We have a new atttypmod field that holds the length for the column as
defined at table-creation time for char() and varchar().  Is that the
number you want?


-- 
Bruce Momjian
maillist@candle.pha.pa.us

Sun, 15 Feb 1998 12:54:48 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] wishlist: PQfsize
Bruce Momjian wrote:
> 
> >
> > Hi all,
> >
> > I would like to add the following item to the
> > wishlist:
> >
> > currently the libpq-function PQfsize returns the
> > size in bytes of the field with the given field-
> > index. If the field is a variable-length field,
> > PQfsize returns -1.
> >
> > In general as well as for some internal functionality
> > of the perl interface it would be useful, if PQfsize
> > would return the number of bytes even for variable-
> > length fields.
> 
> We have a new atttypmod field that holds the length for the column as
> defined at table-creation time for char() and varchar().  Is that the
> number you want?
> 
> --
> Bruce Momjian
> maillist@candle.pha.pa.us


for varchar() and also for the datatype text it would be
nice to know the actual length. If this is not possible,
then the length at creation time is still better than -1.

Edmund
-- 
Edmund Mergl          mailto:E.Mergl@bawue.de
Im Haldenhau 9        http://www.bawue.de/~mergl
70565 Stuttgart       fon: +49 711 747503
Germany               gsm: +49 171 2645325

Sun, 15 Feb 1998 20:56:17 +0100
Edmund Mergl <E.Mergl@bawue.de>
Re: [HACKERS] wishlist: PQfsize
> > We have a new atttypmod field that holds the length for the column as
> > defined at table-creation time for char() and varchar().  Is that the
> > number you want?
> > 
> > --
> > Bruce Momjian
> > maillist@candle.pha.pa.us
> 
> 
> for varchar() and also for the datatype text it would be
> nice to know the actual length. If this is not possible,
> then the length at creation time is still better than -1.

If you use binary cursors, you can use VARSIZE and VARDATA to see the
size and data for a string type.

-- 
Bruce Momjian
maillist@candle.pha.pa.us

Sun, 15 Feb 1998 18:26:26 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] wishlist: PQfsize