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

From Tom Lane
Subject Re: SQL:2008 LIMIT/OFFSET
Date
Msg-id 5168.1224522854@sss.pgh.pa.us
Whole thread Raw
In response to Re: SQL:2008 LIMIT/OFFSET  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane wrote:
>> BTW, I think it's a bad idea to assign made-up parse locations, as
>> you did here:

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

Well, yeah, but what is that?  If you did get an error complaining
about, say, an invalid integral constant, the cursor wouldn't be
pointing at anything sensible.

I'm not even very sure that bison would produce a valid offset at all in
this case; it looks to me like the location macro just copies a value
that might not have been initialized.  Did you test what gets produced?

But even stipulating that the cursor would point at the next or previous
token, it seems it'd be more confusing than useful.
        regards, tom lane


pgsql-hackers by date:

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