Re: TABLESAMPLE patch

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Jaime Casanova <jaime(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tomas Vondra <tv(at)fuzzy(dot)cz>
Subject: Re: TABLESAMPLE patch
Date: 2015-04-01 16:15:43
Message-ID: 551C19AF.5040103@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/04/15 17:52, Robert Haas wrote:
> On Wed, Apr 1, 2015 at 9:49 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>> I am still not sure whether it is okay to move REPEATABLE from
>> unreserved to other category. In-fact last weekend I have spent some
>> time to see the exact reason for shift/reduce errors and tried some ways
>> but didn't find a way to get away with the same. Now I am planning to
>> spend some more time on the same probably in next few days and then
>> still if I cannot find a way, I will share my findings and then once
>> re-review
>> the changes made by Petr in last version. I think overall the patch is in
>> good shape now although I haven't looked into DDL support part of the
>> patch which I thought could be done in a separate patch as well.
>
> That seems like a legitimate concern. We usually try not to make
> keywords more reserved in PostgreSQL than they are in the SQL
> standard, and REPEATABLE is apparently non-reserved there:
>
> http://www.postgresql.org/docs/devel/static/sql-keywords-appendix.html
>
> This also makes "method" an unreserved keyword, which I'm not wild
> about either. Adding new keyword doesn't cost *much*, but is this
> SQL-mandated syntax or something we created? If the latter, can we
> find something to call it that doesn't require new keywords?
>

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...

METHOD is something I added. I guess we could find a way to name this
differently if we really tried. The reason why I picked METHOD was that
I already added the same unreserved keyword in the sequence AMs patch
and in that one any other name does not really make sense.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2015-04-01 16:24:21 Re: Move inet_gist to right place in pg_amproc
Previous Message Tom Lane 2015-04-01 16:13:57 Re: How about to have relnamespace and relrole?