Bug in CREATE VIEW grammar

Started by Bernd Helmleover 21 years ago3 messages
#1Bernd Helmle
mailings@oopsware.de

While having trouble extending the CREATE VIEW grammar i discovered this:

bommel@[local]:yomama #= CREATE VIEW vtest as SELECT * from abteilung WITH;
CREATE VIEW

I can reproduce this on 8.0.0beta1 && beta3 and in a 7.4.2 production
database.

Bernd

#2Stephan Szabo
sszabo@megazone.bigpanda.com
In reply to: Bernd Helmle (#1)
Re: Bug in CREATE VIEW grammar

On Fri, 1 Oct 2004, Bernd Helmle wrote:

While having trouble extending the CREATE VIEW grammar i discovered this:

bommel@[local]:yomama #= CREATE VIEW vtest as SELECT * from abteilung WITH;
CREATE VIEW

I'm not sure what in particular you're getting at. Although technically
WITH is a reserved word and as such shouldn't be usable as a correlation
name for abteilung, we generally try to limit those restrictions whenever
possible.

#3Bernd Helmle
mailings@oopsware.de
In reply to: Stephan Szabo (#2)
Re: Bug in CREATE VIEW grammar

--On Donnerstag, September 30, 2004 16:32:48 -0700 Stephan Szabo
<sszabo@megazone.bigpanda.com> wrote:

On Fri, 1 Oct 2004, Bernd Helmle wrote:

While having trouble extending the CREATE VIEW grammar i discovered this:

bommel@[local]:yomama #= CREATE VIEW vtest as SELECT * from abteilung
WITH; CREATE VIEW

I'm not sure what in particular you're getting at. Although technically
WITH is a reserved word and as such shouldn't be usable as a correlation
name for abteilung, we generally try to limit those restrictions whenever
possible.

Hmm, okay, it wasn't clear to me that WITH is an allowed table alias name.
Looking in the unreserved keyword map in gram.y i see WITH there.
My current work is to extend the CREATE VIEW statement with the WITH [
CASCADE | LOCAL ] CHECK OPTION, so i wondered first, why WITH is not a
reserved word.

Thanks for your reply.

--

Bernd