Fabien COELHO <coe...@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

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to