Re: CREATE TABLE .. PRIMARY KEY quirk - Mailing list pgsql-hackers

From Tom Lane
Subject Re: CREATE TABLE .. PRIMARY KEY quirk
Date
Msg-id 28006.994266736@sss.pgh.pa.us
Whole thread Raw
In response to CREATE TABLE .. PRIMARY KEY quirk  (Colin Strickland <cms@sift.co.uk>)
List pgsql-hackers
Colin Strickland <cms@sift.co.uk> writes:
>   PRIMARY KEY
> (dir_suppliers_var_prodtype_id,dir_suppliers_var_prodtype_id)
> My question is, should this not raise a parser error ?

Yes, it should.  SQL92 saith
        4) Each <column name> in the <unique column list> shall identify           a column of T, and the same column
shallnot be identified more           than once.
 

Looks like we neglect to make that check during initial processing of
the PRIMARY KEY clause.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: Buffer access rules, and a probable bug
Next
From: Hiroshi Inoue
Date:
Subject: Re: Re: Buffer access rules, and a probable bug