Re: Renaming unnamed FK constraints

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Renaming unnamed FK constraints
Дата
Msg-id 20206.1145238212@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Renaming unnamed FK constraints  (Vincent Frison <turman@ohmforce.com>)
Ответы Re: Renaming unnamed FK constraints
Список pgsql-novice
Vincent Frison <turman@ohmforce.com> writes:
> I've created my referential integrity with "REFERENCES TABLE..." directly
> into "CREATE TABLE" statements. I don't have used "ALTER TABLE" with "ADD
> CONSTRAINT constraint_name..." so I have only unnamed constraint for all my
> FKs. Maybe I has been to much lazy..

There's no such thing as an unnamed constraint ... PG would have
generated names for them.  If you're using an old PG version, the
names might look ugly (like "$1"), but they're there.

> This is very hapless since unnamed constraints are totally ignored
> from a lot of SQL clients (PgAdmin3, TOra, SQuirreL...).

Perhaps a name like "$1" would confuse some of those clients, but I
hardly believe it for PgAdmin.  What problem are you seeing *exactly*?

            regards, tom lane

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

Предыдущее
От: Vincent Frison
Дата:
Сообщение: Renaming unnamed FK constraints
Следующее
От: "Winson Yung"
Дата:
Сообщение: Re: how to encrypt trigger function