At 00:24 28/11/00 -0500, Tom Lane wrote:
>Philip Warner <pjw@rhyme.com.au> writes:
>> Just noticed this:
>
>> 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.
That would at least be consistent, but it's still using 'user namespace'
for system-related items, which seems like a bad practice if it can be
avoided. I don't mind a longer name, if that is your objection:
pg_constraint_pk1_zzz or some such.
>If we do either, it will break the recently submitted pg_dump patch that
Not too hard to fix.
>uses the index name as the constraint name. I thought that patch was
>wrongheaded anyway, and would recommend reversing it...
I wasn't too keen on it, but could not come up with any good arguments
against it. We need a unified approach to constraints, but in the mean time
it seems OK. Do you have any more definite objections?
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 0500 83 82 82 | ___________ |
Http://www.rhyme.com.au | / \| | --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/