Re: Display of foreign keys in psql

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Display of foreign keys in psql
Дата
Msg-id 4136ffa0906101515i36a425c2kc72cc5289f88e1cc@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Display of foreign keys in psql  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Display of foreign keys in psql  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Jun 10, 2009 at 11:04 PM, Tom Lane<tgl@sss.pgh.pa.us> wrote:
>
> Or use TABLE:
>
>  "test2_y_fkey" TABLE test2 FOREIGN KEY (y) REFERENCES test1(a)

Hm, one of the things a lot of people said they liked about the
existing list is that it was almost copy-pastable as the command to
recreate the constraint. If we use "TABLE" it might make sense to
reorder things so that it matches the command.

The command that would recreate this constraint is:

ALTER TABLE test2 ADD CONSTRAINT test2_y_fkey FOREIGN KEY (y)
REFERENCES test1(a);

So perhaps something like:

Referenced by:

TABLE test2 CONSTRAINT test2_y_fkey FOREIGN KEY (y) REFERENCES test1(a);


--
Gregory Stark
http://mit.edu/~gsstark/resume.pdf


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

Предыдущее
От: Brendan Jurd
Дата:
Сообщение: Re: Display of foreign keys in psql
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Not quite a security hole in internal_in