A dynamic SQL/ecpg question

From: "Murphy Pope" <pope_murphy(at)hotmail(dot)com>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: A dynamic SQL/ecpg question
Date: 2002-03-25 00:37:15
Message-ID: OE70kVx3OfSap7LhLNy0000ad00@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

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?

Thanks in advance.

-- Murphy

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Bruce Momjian 2002-03-25 01:49:11 Problem with python compile
Previous Message S. Bulterman 2002-03-23 19:18:15 Re: Problem with pgaccess