AW: Constraint names using 'user namespace'?

From: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: AW: Constraint names using 'user namespace'?
Date: 2000-11-28 11:03:28
Message-ID: 11C1E6749A55D411A9670001FA68796336814C@sdexcsrv1.f000.d0188.sd.spardat.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> > pjw=# create table pk1(f1 integer, constraint zzz primary key(f1));
> > NOTICE: CREATE TABLE/PRIMARY KEY will create implicit
> index 'zzz' for
> > table 'pk1'
> > CREATE
> > pjw=# create table zzz(f1 integer);
> > ERROR: Relation 'zzz' already exists
>
> > Is there a good reason why the automatically created items
> do not have a
> > 'pg_' in front of their names?
>
> Not a good idea. I think it should probably be pk1_zzz in this case.
>
> If we do either, it will break the recently submitted pg_dump
> patch that
> uses the index name as the constraint name. I thought that patch was
> wrongheaded anyway, and would recommend reversing it...

I rather think, that having index names clash with table names is the bogus part.
That the index gets the specified name from the constraint clause is more
or less expected behavior (Informix, Oracle ...).

Andreas

Browse pgsql-hackers by date

  From Date Subject
Next Message Don Baccus 2000-11-28 14:29:49 RE: Constraint names using 'user namespace'?
Previous Message Oliver Elphick 2000-11-28 10:47:28 Patch for 7.0.3 code to read pg_options