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 15:43:59 |
Message-ID: | 3FAA6C3F.5030705@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
>The reason the spec defines these views this way is that it expects
>constraint names to be unique across a whole schema. We don't enforce
>that, and I don't think we want to start doing so (that was already
>proposed and shot down at least once). You are of course free to use
>constraint names that are distinct if you want to follow the spec's
>lead.
>
>
Would a good halfway house be to ensure that generated names were unique
within a schema (e.g. instead of generating "$1" generate
"tablename$1")? I know this might make looking to see if something is a
generated constraint mildly harder. It would have the advantage of a
slightly more meaningful name on the constraint.
Doing that we still wouldn't enforce the spec's requirements for
uniqueness of constraint names within a schema (which are arguably
silly), but wouldn't violate them ourselves.
(I'm sure there are wrinkles I haven't thought of, though. Not sure
about what it would do to backwards compatibility, for instance.)
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-11-06 15:54:29 | Re: Information Schema and constraint names not unique |
Previous Message | Tom Lane | 2003-11-06 15:35:47 | Re: Very poor estimates from planner |