Re: Updatable views/with check option parsing

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Updatable views/with check option parsing
Дата
Msg-id 447713F5.9010409@dunslane.net
обсуждение исходный текст
Ответ на Re: Updatable views/with check option parsing  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Updatable views/with check option parsing
Список pgsql-hackers
Peter Eisentraut wrote:
> Am Mittwoch, 24. Mai 2006 20:42 schrieb Tom Lane:
>   
>> Peter Eisentraut <peter_e@gmx.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

cheers

andrew





В списке pgsql-hackers по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Bug with UTF-8 character
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Updatable views/with check option parsing