Re: Updatable views/with check option parsing - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Updatable views/with check option parsing
Date
Msg-id 1148470114.3843.13.camel@localhost.localdomain
Whole thread Raw
In response to Updatable views/with check option parsing  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Updatable views/with check option parsing
List pgsql-hackers
Ühel kenal päeval, K, 2006-05-24 kell 13:13, kirjutas Peter Eisentraut:
> 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:
> 
> CREATE VIEW foo AS SELECT expr :: TIME . WITH
> 
> (where expr is a_expr or b_expr and TIME could also be TIMESTAMP or TIME(x) or 
> TIMESTAMP(x)).
> 
> The continuation here could be WITH TIME ZONE (calling for a shift) or WITH 
> CHECK OPTION (calling for a reduce).
> 
> All the usual ideas about unfolding the rules or making keywords more reserved 
> don't work (why should they).  A one-token lookahead simply can't parse this.

Can't we teach tokenized a new token "WITH TIME ZONE" ?

> I have had some ideas about trying to play around with the precedence rules -- 
> giving WITH TIME ZONE a higher precedence than WITH CHECK OPTION -- but I 
> have no experience with that and I am apparently not doing it right, if that 
> is supposed to work at all.
> 
> If we can't get that to work, it seems that we are out of options unless we 
> want to just accept the conflicts.
> 
> How should we go about this, and what should Bernd do with his patch, which, 
> as I understand it, has been held up for quite a while simply because he is 
> concerned about this issue?
> 
-- 
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia

Skype me:  callto:hkrosing
Get Skype for free:  http://www.skype.com




pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Updatable views/with check option parsing
Next
From: max.poletto@gmail.com
Date:
Subject: Re: problem with PQsendQuery/PQgetResult and COPY FROM statement