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

Re: Constraint names using 'user namespace'?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Constraint names using 'user namespace'?
Date: 2000-11-27 23:33:57
Message-ID: Pine.LNX.4.21.0011280031590.832-100000@peter.localdomain (view raw or flat)
Thread:
Lists: 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(at)gmx(dot)net       http://yi.org/peter-e/


In response to

pgsql-hackers by date

Next:From: selkovjrDate: 2000-11-28 00:03:33
Subject: Re: [HACKERS] Indexing for geographic objects?
Previous:From: Tom LaneDate: 2000-11-27 23:30:09
Subject: Ancient lock bug figured out

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