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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql/src/backend/nodes (copyfuncs.c outfuncs.c print.c)
Date: 2000-10-27 03:36:19
Message-ID: 27892.972617779@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Hiroshi Inoue 2000-10-27 03:59:02 Re: pgsql/src/backend/nodes (copyfuncs.c outfuncs.c print.c)
Previous Message Hiroshi Inoue 2000-10-27 03:32:51 Re: pgsql/src/backend/nodes (copyfuncs.c outfuncs.c print.c)

Browse pgsql-hackers by date

  From Date Subject
Next Message Lamar Owen 2000-10-27 03:48:56 Re: [GENERAL] 7.0 vs. 7.1 (was: latest version?)
Previous Message Hiroshi Inoue 2000-10-27 03:32:51 Re: pgsql/src/backend/nodes (copyfuncs.c outfuncs.c print.c)