Re: SQL:2008 LIMIT/OFFSET - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: SQL:2008 LIMIT/OFFSET
Date
Msg-id 48FC9F00.8000907@gmx.net
Whole thread Raw
In response to Re: SQL:2008 LIMIT/OFFSET  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: SQL:2008 LIMIT/OFFSET
List pgsql-hackers
Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
>> SQL:2008 specifies the following syntax for what we have so far called 
>> LIMIT and OFFSET
>> SELECT ... [ ORDER BY ... ]
>>      OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS} ONLY
> 
> What does the "NEXT" option mean?

FIRST and NEXT mean exactly the same, namely nothing.

> BTW, I think it's a bad idea to assign made-up parse locations, as
> you did here:
> 
>> +            | /*EMPTY*/        { $$ = makeIntConst(1, @$); }
> 
> Just use -1.

Hmm, @$ is the location of the complete rule, so it should point to the
"empty" spot in theory.  Or am I misunderstanding something?

It's hard to simulate an error with this of course.


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Block level concurrency during recovery
Next
From: Simon Riggs
Date:
Subject: Re: Index use during Hot Standby