Re: issue about information_schema REFERENTIAL_CONSTRAINTS

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: issue about information_schema REFERENTIAL_CONSTRAINTS
Дата
Msg-id 6462.1283454730@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: issue about information_schema REFERENTIAL_CONSTRAINTS  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: issue about information_schema REFERENTIAL_CONSTRAINTS  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-bugs
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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: issue about information_schema REFERENTIAL_CONSTRAINTS
Следующее
От: Alexsander Rosa
Дата:
Сообщение: Re: BUG #5629: ALTER SEQUENCE foo START execute a RESTART