From: Christof Petig <christof@petig-baender.de>
To: Murphy Pope <pope_murphy@hotmail.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: A dynamic SQL/ecpg question
Date: Mon, 01 Apr 2002 22:30:55 +0200
Message-ID: <3CA8C37F.4000607@petig-baender.de> (raw)
References: <OE70kVx3OfSap7LhLNy0000ad00@hotmail.com>
Murphy Pope wrote:
> Can anyone explain the difference between the following descriptor members?
>
>
>
> LENGTH
>
> OCTET_LENGTH
>
> RETURNED_LENGTH
>
> RETURNED_OCTET_LENGTH
>
>
>
> From looking at the source code, the last two are identical and it
> looks like they return the length of an individual row/column value
> (i.e. for a varchar column, they would return the length of an actual
> varchar value).
>
>
>
> I think OCTET_LENGTH will return the size of the column as stored in the
> database.
>
>
>
> I can't quite figure out what LENGTH is supposed to do. It returns
> PQfmod( ) - VARHDRSZ. How is that different from the OCTET_LENGTH?
The problem is with pgsql's frontend/backend protocol (libpq). You only
get these two values, and I can't imagine a query which gives the
requested values. So you can't get/set any sensible values for two of them.
Christof
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: christof@petig-baender.de, pope_murphy@hotmail.com
Subject: Re: A dynamic SQL/ecpg question
In-Reply-To: <3CA8C37F.4000607@petig-baender.de>
* 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