Robert Haas <robertmh...@gmail.com> writes:
> On Fri, Feb 18, 2011 at 6:42 AM, Itagaki Takahiro
>> The most easiest fix would be preventing them in parser level.

> Well, that sucks.  I had intended for that to be disallowed at the
> parser level, but obviously I fail.  It seems that disallowing this in
> the parser will require duplicating the OptTemp production.  Or
> alternatively we can just add an error check to the CREATE VIEW and
> CREATE SEQUENCE productions, i.e.

> if ($4 == RELPERSISTENCE_UNLOGGED)
>     ereport(ERROR, ...);

> I am somewhat leaning toward the latter option, to avoid unnecessarily
> bloating the size of the parser tables, but I can do it the other way
> if people prefer.

If by the first option you mean causing the failure report to be "syntax
error" rather than anything more specific, then I agree that option
sucks.  I'd actually vote for putting the error test somewhere in
statement execution code, well downstream of gram.y.  The parser's job
is to produce a parse tree, not to encapsulate knowledge about which
combinations of options are supported.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to