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

Re: CREATE TABLE .. PRIMARY KEY quirk

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Colin Strickland <cms(at)sift(dot)co(dot)uk>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: CREATE TABLE .. PRIMARY KEY quirk
Date: 2001-07-04 17:12:16
Message-ID: 28006.994266736@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Colin Strickland <cms(at)sift(dot)co(dot)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 shall not be identified more
            than once.

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

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Hiroshi InoueDate: 2001-07-04 23:43:24
Subject: Re: Re: Buffer access rules, and a probable bug
Previous:From: Tom LaneDate: 2001-07-04 17:09:08
Subject: Re: Re: Buffer access rules, and a probable bug

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