just noticed another difference between postgres and oracle:
oracle:
SQL> create table t1 ( a number(10,2 ) ); Table created. SQL> create view v1 as select a from t1; View created. SQL> alter table t1 modify ( a number(11,2)); Table altered.
postgresql:
[postgres] > create table t1 ( a numeric(10,2) ); CREATE TABLE [postgres] > create view v1 as select a from t1; CREATE VIEW [postgres] > alter table t1 alter column a type numeric(11,2); ERROR: cannot alter type of a column used by a view or rule DETAIL: rule _RETURN on view v1 depends on column "a"
the same is true if you want to drop a table which has a view defined on it:
oracle:
SQL> drop table t1; Table dropped.
postgres:
[postgres] > drop table t1; ERROR: cannot drop table t1 because other objects depend on it DETAIL: view v1 depends on table t1 HINT: Use DROP ... CASCADE to drop the dependent objects too.