Re: libpq / SQL3

Поиск
Список
Период
Сортировка
От Chris Bitmead
Тема Re: libpq / SQL3
Дата
Msg-id 396916EC.1AE03D6A@nimrod.itg.telecom.com.au
обсуждение исходный текст
Ответ на Re: libpq / SQL3  (Peter Eisentraut <peter_e@gmx.net>)
Список 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 по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: libpq / SQL3
Следующее
От: Chris Bitmead
Дата:
Сообщение: Re: [GENERAL] PostgreSQL vs. MySQL