Re: pgsql/src/backend/nodes (copyfuncs.c outfuncs.c print.c)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql/src/backend/nodes (copyfuncs.c outfuncs.c print.c)
Дата
Msg-id 27892.972617779@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pgsql/src/backend/nodes (copyfuncs.c outfuncs.c print.c)  (Tom Lane <tgl@postgresql.org>)
Список pgsql-committers
Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> How would be the behavior of the following command sequence ?

> begin;
> declare myc cursor for select * from t1 limit 1;
> fetch in myc;
> fetch in myc;

> Could the last fetch return a row ?

As the code now stands, the second fetch would return nothing.
I think this is clearly what any reasonable person would expect
given the LIMIT 1 clause.

LIMIT ALL is a different story, because there's no semantic difference
between writing LIMIT ALL and writing no limit clause at all.  We have
the option to create a distinction for planning purposes, however.
Question is do we need one?

            regards, tom lane

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

Предыдущее
От: Hiroshi Inoue
Дата:
Сообщение: Re: pgsql/src/backend/nodes (copyfuncs.c outfuncs.c print.c)
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql/src/test/regress/sql (inet.sql)