Re: [PATCHES] selecting large result sets in psql using cursors

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] selecting large result sets in psql using cursors
Дата
Msg-id 26613.1155747051@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: [PATCHES] selecting large result sets in psql using cursors  (Peter Eisentraut <peter_e@gmx.net>)
Re: [PATCHES] selecting large result sets in psql using cursors  (Chris Mair <chrisnospam@1006.org>)
Список pgsql-hackers
Chris Mair <list@1006.org> writes:
> attached is the new and fixed version of the patch for selecting
> large result sets from psql using cursors.

The is_select_command bit is wrong because it doesn't allow for left
parentheses in front of the SELECT keyword (something entirely
reasonable when considering big union/intersect/except trees).
Also you'd need to allow for VALUES as the first keyword.
But isn't the whole thing unnecessary?  ISTM you could just ship the
query with the DECLARE CURSOR prepended, and see whether you get a
syntax error or not.

At some point we ought to extend libpq enough to expose the V3-protocol
feature that allows partial fetches from portals; that would be a
cleaner way to implement this feature.  However since nobody has yet
proposed a good API for this in libpq, I don't object to implementing
\u with DECLARE CURSOR for now.

BTW, \u seems not to have any mnemonic value whatsoever ... isn't there
some other name we could use?

            regards, tom lane

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCHES] Forcing current WAL file to be archived
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Enum proposal / design