Skip site navigation (1) Skip section navigation (2)

Re: Updatable views/with check option parsing

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Updatable views/with check option parsing
Date: 2006-05-26 14:43:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Peter Eisentraut wrote:
> Am Mittwoch, 24. Mai 2006 20:42 schrieb Tom Lane:
>> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>>> I have spent some time figuring out how to resolve the parsing conflicts
>>> in Bernd Helmle's updatable views patch.  The problem has now been
>>> reduced to specifically this situation:
>> Could we see the proposed patches for gram.y?
> Here it is.
> $ make -W gram.y gram.c
> bison -y -d  gram.y
> conflicts: 4 shift/reduce
> These are basically for instances of the same problem.

I had a quick look - I don't think there is an easy answer with the 
current proposed grammar. If we want to prevent shift/reduce conflicts I 
suspect we'd need to use a different keyword than WITH, although I can't 
think of one that couldn't be a trailing clause on a select statment, 
which is the cause of the trouble. Another possibility would be to move 
the optional WITH clause so that it would come before the AS clause. 
Then there should be no conflict, I believe. Something like:

 ViewStmt: CREATE OptTemp VIEW qualified_name opt_column_list
               opt_check_option AS SelectStmt



In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2006-05-26 14:50:28
Subject: Re: Updatable views/with check option parsing
Previous:From: Martijn van OosterhoutDate: 2006-05-26 14:37:25
Subject: Re: Bug with UTF-8 character

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group