Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] CREATE VIEW fix

From: "Ross J(dot) Reedstrom" <reedstrm(at)wallace(dot)ece(dot)rice(dot)edu>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Postgres Hackers List <hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] CREATE VIEW fix
Date: 2000-03-07 19:41:54
Message-ID: 20000307134154.D21828@rice.edu (view raw or flat)
Thread:
Lists: pgsql-hackers
On Tue, Mar 07, 2000 at 04:14:35PM +0000, Thomas Lockhart wrote:
> I've got patches to fix the CREATE VIEW command to support SQL92
> syntax for result column names, a la
> 
>   CREATE VIEW (a, b, c) AS SELECT ...
> 
> It is an almost trivial fix, requiring the addition of a single field
> in the View structure and a few lines of code in analyze.c.
> 

Hmm, couldn't you just rewrite the SELECT d, e, f ... part to use the 
AS syntax? I was thinking that both:

   CREATE VIEW (a, b, c) AS SELECT d, e, f ...
   CREATE VIEW AS SELECT d AS a, e AS b, f AS c ...

should result in the same VIEW being created. But, hey, don't let me
knock already written code! 

> I'll commit this at the same time I commit support for the SQL92
> OVERLAPS operator, which will need an initdb anyway since there are a
> few new functions in pg_proc. I believe that we have at least one
> other patch coming which will force an initdb anyway, and I'll
> coordinate with that.
> 
>                       - Thomas

Excellent: Both changes will help with the NIST test suite I'm (trying)
to run.

Ross
-- 
Ross J. Reedstrom, Ph.D., <reedstrm(at)rice(dot)edu> 
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St.,  Houston, TX 77005

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2000-03-07 22:50:57
Subject: Re: [HACKERS] Re: [BUGS] uniqueness not always correct
Previous:From: Tom LaneDate: 2000-03-07 19:29:32
Subject: Re: [HACKERS] alter_table.sql

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group