Re: Meaning of keyword category list in src/backend/parser/gram.y - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Meaning of keyword category list in src/backend/parser/gram.y
Date
Msg-id 04c401ce4a1d$2b73cf00$825b6d00$@kapila@huawei.com
Whole thread Raw
In response to Meaning of keyword category list in src/backend/parser/gram.y  (soroosh sardari <soroosh.sardari@gmail.com>)
List pgsql-hackers
On Sunday, May 05, 2013 1:03 PM soroosh sardari wrote:
> Hi
> I'm trying to add a new constraint to column constraint.
> I add a new keyword ro kwlist.h and gram.y, and also edit
ColConstraintElem.
> The problem is i don't know what is "Keyword category lists" at the end of
gram.y.

Keyword category lists are to distinguish different type of keywords.
For example, if you add keyword in reserved_keyword, then you cannot use
that as variable in SQL where as if you put in unreserved_keyword, then you
can use it.


> when I added the new keyword in "unreserved_keyword", shift/reduce and
reduce/reduce conflicts appear in bison outputs.
> any idea about this problem and meaning of  "Keyword category lists" is
appreciated.

This means the grammar syntax you have defined for ColConstraintElem
conflicts with some already existing definition. shift/reduce conflicts can
occur due to your changes in  ColConstraintElem definition. I suggest first
you can try with minimal/dummy changes in ColConstraintElem and once it
passes then you can try with your actual changes to see what part of changes
cause conflicts.

With Regards,
Amit Kapila.




pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: pg_dump versus materialized views
Next
From: Michael Paquier
Date:
Subject: Re: \watch stuck on execution of commands returning no tuples