Re: create view bug - Mailing list pgsql-bugs

From Tom Lane
Subject Re: create view bug
Date
Msg-id 12631.997488728@sss.pgh.pa.us
Whole thread Raw
In response to create view bug  (Jefim Matskin <mjefim@sphera.com>)
List pgsql-bugs
Jefim Matskin <mjefim@sphera.com> wrote:
> My problem is that the  ErWin generates the following syntax
> create view [view name] ( [col1] , [col2] ) as select [s1], [s2]  from
> [table name];
> and as far as I know this is SQL92.

On looking more closely, we *do* support this syntax, and have since
release 7.0.  I was misled by the fact that the on-line documentation
failed to mention it.  (Docs fixed now.)

> One of the column names I need is
> 'primary' - and the creation of the view fails.

The problem here is that PRIMARY is a reserved word in Postgres.
I realize that SQL92 describes it as a non-reserved keyword, but
trying to make it so creates ambiguities in our grammar.  You'll
need to pick a different column name.  Sorry.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: pg_dumpall
Next
From: pgsql-bugs@postgresql.org
Date:
Subject: CREATE FUNCTION [...] AS '' LANGUAGE 'sql' crashes backend