Re: Information Schema and constraint names not unique

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Postgresql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Information Schema and constraint names not unique
Date: 2003-11-06 17:01:17
Message-ID: 3FAA7E5D.1090901@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

>Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>
>
>>I don't think we really need a method to guarantee unique names. It would
>>already help a lot if we just added the table name, or something that was
>>until a short time before the action believed to be the table name, or
>>even only the table OID, before (or after) the $1.
>>
>>
>
>I don't have a problem with switching from "$1" to "tablename_$1", or
>some such, for auto-generated constraint names. But if it's not
>guaranteed unique, does it really satisfy Philip's concern?
>
>
>
He wouldn't see identical rows returned from his query any more, would he?

My point was that doing this nothing would prevent the user creating
duplicate constraint names but the system would not produce (or would be
most unlikely to produce) duplicates. I read the thread from last year
on Google at

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=18252.1025635125%40sss.pgh.pa.us&rnum=1&prev=/groups%3Fq%3Dunique%2Bconstraint%2Bnames%2Bgroup:comp.databases.postgresql.hackers%2Bgroup:comp.databases.postgresql.hackers%2Bgroup:comp.databases.postgresql.hackers%2Bgroup:comp.databases.postgresql.hackers%26hl%3Den%26lr%3D%26ie%3DUTF-8%26group%3Dcomp.databases.postgresql.hackers%26selm%3D18252.1025635125%2540sss.pgh.pa.us%26rnum%3D1

which was why I thought this would be a move in the right direction
without encountering those problems.

(I much prefer using tablename to OID, BTW)

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2003-11-06 17:39:11 Re: Changes to Contributor List
Previous Message Tom Lane 2003-11-06 16:57:57 Re: Information Schema and constraint names not unique