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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

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