LucidDB / luciddb

DEFUNCT: See README
https://github.com/LucidDB/luciddb
Apache License 2.0
53 stars 24 forks source link

[FRG-243] CREATE VIEW should give error if query's column names are not unique #629

Open dynamobi-build opened 12 years ago

dynamobi-build commented 12 years ago

[reporter="jhyde", created="Wed, 13 Dec 2006 18:47:02 -0500 (GMT-05:00)"] CREATE VIEW should give error if query's column names are not unique.

SQL:2003 Part 2 Section 11.2 Syntax Rule 12:

"12) If any two columns in the table specified by the
have equivalent s, or
     if any column of that table has an implementation-dependent name,
then a shall be
     specified."

So,

  CREATE VIEW v AS SELECT empno, empno FROM emp;

should be illegal, and

  CREATE VIEW v AS SELECT upper(empno), lower(deptno) FROM emp

should also be illegal (instead of using EXPR$0 and EXPR$1).