| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Joel Jacobson <joel(at)gluefinance(dot)com> |
| Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Florian Pflug <fgp(at)phlo(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: pg_depend explained |
| Date: | 2011-01-12 15:15:57 |
| Message-ID: | 25830.1294845357@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Joel Jacobson <joel(at)gluefinance(dot)com> writes:
> Also, circular dependencies seems impossible for some object classes,
> such as functions, views, constraints and triggers.
regression=# create table tt(f1 int, f2 int);
CREATE TABLE
regression=# create view v1 as select * from tt;
CREATE VIEW
regression=# create view v2 as select * from v1;
CREATE VIEW
regression=# create or replace view v1 as select * from v2;
CREATE VIEW
regression=# drop view v1;
ERROR: cannot drop view v1 because other objects depend on it
DETAIL: view v2 depends on view v1
HINT: Use DROP ... CASCADE to drop the dependent objects too.
regression=# drop view v2;
ERROR: cannot drop view v2 because other objects depend on it
DETAIL: view v1 depends on view v2
HINT: Use DROP ... CASCADE to drop the dependent objects too.
This isn't particularly *useful*, maybe, but it's hardly "impossible".
And if we analyzed function dependencies in any detail, circular
dependencies among functions would be possible (and useful).
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Heikki Linnakangas | 2011-01-12 15:17:38 | Re: Allowing multiple concurrent base backups |
| Previous Message | David Fetter | 2011-01-12 15:15:24 | Re: Allowing multiple concurrent base backups |