From: Tom Lane <tgl@sss.pgh.pa.us>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: PostgreSQL Bugs List <pgsql-bugs@postgresql.org>
Subject: Re: issue about information_schema REFERENTIAL_CONSTRAINTS
Date: Thu, 02 Sep 2010 15:12:10 -0400
Message-ID: <6462.1283454730@sss.pgh.pa.us> (raw)
In-Reply-To: <alpine.DEB.2.00.1009021959070.2656@localhost.localdomain>
References: <alpine.DEB.2.00.1008311337530.2449@localhost.localdomain>
<2683.1283266019@sss.pgh.pa.us>
<alpine.DEB.2.00.1009011557480.2570@localhost.localdomain>
<1283369900.15386.0.camel@vanquo.pezone.net>
<alpine.DEB.2.00.1009020741380.2656@localhost.localdomain>
<1283438419.23199.0.camel@vanquo.pezone.net>
<alpine.DEB.2.00.1009021959070.2656@localhost.localdomain>
Fabien COELHO <coelho@cri.ensmp.fr> writes:
> (1) use the OID as the "constraint name" everywhere, it would work, it
> would not look so good for display, but it is simple and fast.
> (2) otherwise something built on top of <table,constraint>. To be on the
> safe side, I would build a string (sql_identifier?) with something like:
> quote_ident(<table name>) || '.' || quote_ident(<constraint name>)
Note that (2) fails for long names; you have to do something to
compress to NAMEDATALEN.
The big problem with either of these is that it's no longer easily
possible to extract the actual constraint name from the view.
In any case, I am fairly sure that not having the constraint_name column
show the actual constraint name is a violation of the spirit of the SQL
spec, whether or not you can claim that it meets the letter.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: tgl@sss.pgh.pa.us, coelho@cri.ensmp.fr, peter_e@gmx.net, pgsql-bugs@postgresql.org
Subject: Re: issue about information_schema REFERENTIAL_CONSTRAINTS
In-Reply-To: <6462.1283454730@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox