Re: libpq / SQL3 - Mailing list pgsql-hackers

From Chris Bitmead
Subject Re: libpq / SQL3
Date
Msg-id 396916EC.1AE03D6A@nimrod.itg.telecom.com.au
Whole thread Raw
In response to Re: libpq / SQL3  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut wrote:

> So highly robust applications would have to call DescribeCol before any
> GetData or similar call in order to allocate a sufficiently sized buffer.
> Which is a problem if DescribeCol doesn't know about user-defined data
> types.

DescribeCol can be made to know about all data types. The problem is
that DescribeCol I don't think is designed to be called after every
fetch, so it doesn't know how big each entry is.

> But remember that SQL does not provide any variable-without-limit length
> types, so there is theoretically never any uncertainty about what kind of
> buffer to allocate if you know the query.

Pretty lame. But I saw somewhere in the document that GetData is able to
retrieve big fields piece by piece. But I could never figure out how
that is supposed to happen.

Then there is the stuff about handling blobs, which I get the feeling
from some of the wording that this interface is supposed to handle any
big field, but it's also a bit obscure.


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: libpq / SQL3
Next
From: Chris Bitmead
Date:
Subject: Re: [GENERAL] PostgreSQL vs. MySQL