Re: Constraint names using 'user namespace'? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Constraint names using 'user namespace'?
Date
Msg-id Pine.LNX.4.21.0011280031590.832-100000@peter.localdomain
Whole thread Raw
In response to Constraint names using 'user namespace'?  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-hackers
Philip Warner writes:

> 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?

One thing that has always bugged me is why indexes have names at all.  I
can never think of any.  The table name and the attribute
name(s)/number(s) should suffice.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



pgsql-hackers by date:

Previous
From: mlw
Date:
Subject: 8192 BLCKSZ ?
Next
From: Tom Lane
Date:
Subject: Ancient lock bug figured out