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

From Greg Stark
Subject Re: Updatable views/with check option parsing
Date
Msg-id 87hd3cpsqk.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Updatable views/with check option parsing  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:

> So we get:
> 
> CREATE VIEW foo AS SELECT expr :: TIME WITH TIME ZONE        <-- OK
> CREATE VIEW foo AS SELECT expr :: TIME WITH CHECK OPTION     <-- parse error
> CREATE VIEW foo AS SELECT (expr :: TIME) WITH CHECK OPTION   <-- OK

I haven't really been following this conversation, but just on the off chance
this is a useful idea: Would it work to make "WITH" just a noise word? then
you would just need one token of look-ahead to recognize "TIME ZONE" or "CHECK
OPTION" instead of 2. I don't know what <levels clause>s look like so I'm not
sure if you would be able to recognize them without seeing the WITH. I'm not
even sure this works even if you can for that matter.

-- 
greg



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Inefficient bytea escaping?
Next
From: Andreas Pflug
Date:
Subject: Re: Inefficient bytea escaping?