Re: create view bug

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jefim Matskin <mjefim(at)sphera(dot)com>
Cc: pgsql-bugs(at)postgreSQL(dot)org
Subject: Re: create view bug
Date: 2001-08-11 00:12:08
Message-ID: 12631.997488728@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Jefim Matskin <mjefim(at)sphera(dot)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

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2001-08-11 19:16:11 CREATE FUNCTION [...] AS '' LANGUAGE 'sql' crashes backend
Previous Message Peter Eisentraut 2001-08-10 22:13:05 Re: pg_dumpall