Re: Creating unique constraints on OID

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Cc: "PostgreSQL Development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Creating unique constraints on OID
Date: 2001-10-23 02:09:33
Message-ID: ECEHIKNFIMMECLEBJFIGAEENCCAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

So the result of all this is that the behaviour of my ADD UNIQUE code is
correct in this case?

> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Shouldn't this work?
> > create table test ( a int, unique (oid) );
> > ERROR: CREATE TABLE: column "oid" named in key does not exist
>
> Now it does.

In 7.2 you mean? Or did you just fix it then?

> > And shouldn't the last one say "ALTER"?
>
> The reason that happens is that parser/analyze.c transforms the command
> into an ALTER TABLE step that adds a constraint (a no-op in this case)
> plus a CREATE INDEX step. The commandTag emitted by the last step is
> what psql shows. This could possibly be fixed, but it seems not worth
> the trouble.

If it were to be changed - I really wouldn't know where to do that...

Chris

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-10-23 02:32:57 Re: [GENERAL] To Postgres Devs : Wouldn't changing the selectlimit
Previous Message Hiroshi Inoue 2001-10-23 02:03:24 Re: [GENERAL] To Postgres Devs : Wouldn't changing the