Re: how to get dependancies of a table?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: how to get dependancies of a table?
Дата
Msg-id 9242.1215439679@sss.pgh.pa.us
обсуждение исходный текст
Ответ на how to get dependancies of a table?  (nobs@nobswolf.info (Emil Obermayr))
Ответы Re: how to get dependancies of a table?
Список pgsql-novice
nobs@nobswolf.info (Emil Obermayr) writes:
> Instead I would prefer to see the dependancies. I have no idea where to
> look.

Fix whatever client you're using to not throw away NOTICE messages ...

regression=# create table foo (f1 int primary key);
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo"
CREATE TABLE
regression=# create table bar (d1 int references foo);
CREATE TABLE
regression=# create table baz (d1 int references foo);
CREATE TABLE
regression=# drop table foo;
NOTICE:  constraint baz_d1_fkey on table baz depends on table foo
NOTICE:  constraint bar_d1_fkey on table bar depends on table foo
ERROR:  cannot drop table foo because other objects depend on it
HINT:  Use DROP ... CASCADE to drop the dependent objects too.

            regards, tom lane

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

Предыдущее
От: nobs@nobswolf.info (Emil Obermayr)
Дата:
Сообщение: how to get dependancies of a table?
Следующее
От: "Marc Abbott"
Дата:
Сообщение: Object Privileges