Re: libpq / SQL3
Chris <chrisb@nimrod.itg.telstra.com.au>
From: Chris Bitmead <chrisb@nimrod.itg.telstra.com.au>
To: Peter Eisentraut <peter_e@gmx.net>, Postgres Hackers List <hackers@postgresql.org>
Date: 2000-07-10T00:21:00Z
Lists: 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.