From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Assertion failure on UNLOGGED VIEW and SEQUENCE |
Date: | 2011-02-18 15:02:47 |
Message-ID: | 21212.1298041367@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2011-02-18 15:09:15 | pgsql: Make a hard state change from catchup to streaming mode. |
Previous Message | Gurjeet Singh | 2011-02-18 15:02:38 | Re: Fix for Index Advisor related hooks |