Re: [BUGS] issue about information_schema REFERENTIAL_CONSTRAINTS

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-docs(at)postgresql(dot)org
Subject: Re: [BUGS] issue about information_schema REFERENTIAL_CONSTRAINTS
Date: 2011-02-20 15:35:27
Message-ID: 28932.1298216127@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-docs

Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> writes:
> This issue makes the "information_schema" pretty useless for being really
> use for serious work as the data can be ambiguous, so I still claim that
> for me this is a real "bug" rather than just a "feature", which is the
> status reached once a bug is documented:-)

> When constraint names are generated by postgresql, ISTM that the software
> is free to choose them so they could be chosen non ambiguous per schema.

We do that already. See ChooseConstraintName and ChooseRelationName.

> When users choose colliding names, I agree that it would break existing
> schemas, but there could be an option to enforce uniqueness of the name
> per schema if desired.

What would be the point of that? IIRC, your complaint about this was in
connection with wanting to write some information-schema-using code that
could be used by anybody. Such code could hardly assume that the option
was set.

Basically, the only way to satisfy your request is to take freedom away
from our users, and we're unlikely to do that.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2011-02-20 21:07:46 Re: BUG #5798: Some weird error with pl/pgsql procedure
Previous Message Maxim Boguk 2011-02-20 12:25:35 Re: BUG #5798: Some weird error with pl/pgsql procedure

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2011-02-21 03:21:37 Re: Ambiguous index entry for Privileges
Previous Message Dmitriy Igrishin 2011-02-20 09:19:19 Re: Terms.