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-26 23:49:52
Message-ID: 22987.972604192@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:
>> Re-implement LIMIT/OFFSET as a plan node type, instead of a hack in
>> ExecutorRun. This allows LIMIT to work in a view. Also, LIMIT in a
>> cursor declaration will behave in a reasonable fashion,

> Does "reasonable" mean that LIMIT is treated as optimizer's
> hint but doesn't restrict total FETCH counts ?

No, it means that a LIMIT in a cursor means what it says: the cursor
will show that many rows and no more. FETCH lets you move around in
the cursor, but not override the limit. I decided that the other
behavior was just too darn weird... if you want to argue about that,
let's take it up on pghackers not committers.

Yes, the optimizer does pay attention to the limit.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Hiroshi Inoue 2000-10-27 00:09:33 Re: pgsql/src/backend/nodes (copyfuncs.c outfuncs.c print.c)
Previous Message Hiroshi Inoue 2000-10-26 23:45:30 Re: pgsql/src/backend/nodes (copyfuncs.c outfuncs.c print.c)

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2000-10-27 00:09:33 Re: pgsql/src/backend/nodes (copyfuncs.c outfuncs.c print.c)
Previous Message Larry Rosenman 2000-10-26 23:49:38 Re: Summary: what to do about INET/CIDR