Closed jasoncodes closed 9 years ago
SELECT DISTINCT(cl2.relname)
FROM pg_depend dep
INNER JOIN pg_class cl ON dep.refobjid = cl.oid
INNER JOIN pg_rewrite ON dep.objid = pg_rewrite.oid
INNER JOIN pg_class cl2 ON pg_rewrite.ev_class = cl2.oid
WHERE cl.oid != cl2.oid AND deptype = 'n' AND cl.relname = $1;
B depends on A. A has an incompatible change made. A cannot be updated without dropping, which requires dropping B as well. Drop B, create A, create B inside a single transaction.