Re: TABLESAMPLE patch - Mailing list pgsql-hackers

From Petr Jelinek
Subject Re: TABLESAMPLE patch
Date
Msg-id 551C8161.6010203@2ndquadrant.com
Whole thread Raw
In response to Re: TABLESAMPLE patch  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: TABLESAMPLE patch
List pgsql-hackers
On 01/04/15 18:38, Robert Haas wrote:
> On Wed, Apr 1, 2015 at 12:15 PM, Petr Jelinek <petr@2ndquadrant.com> wrote:
>> REPEATABLE is mandated by standard. I did try for quite some time to make it
>> unreserved but was not successful (I can only make it unreserved if I make
>> it mandatory but that's not a solution). I haven't been in fact even able to
>> find out what it actually conflicts with...
>
> Yeah, that can be hard to figure out.  Did you run bison with -v and
> poke around in gram.output?
>

Oh, no I didn't (I didn't know gram.output will be generated). This 
helped quite a bit. Thanks.

I now found the reason, it's conflicting with alias but that's my 
mistake - alias should be before TABLESAMPLE clause as per standard and 
I put it after in parser. Now that I put it at correct place REPEATABLE 
can be unreserved keyword. This change requires making TABLESAMPLE a 
"type_func_name_keyword" but that's probably not really an issue as 
TABLESAMPLE is reserved keyword per standard.

--  Petr Jelinek                  http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: POLA violation with \c service=
Next
From: Bruce Momjian
Date:
Subject: Re: The return value of allocate_recordbuf()