Hello Guys,

I am having a scenario close to the one below, I have defined a function which 
depends on a view. I am able to drop the view, but my server did not complain 
about the dependency. 


In the scenario  below, one can drop the views a2 and a1 respectively, and when 
executing a3(), certainly an exception will be raised. I think there should be 
an entry for this dependency in the pg_depend table with dependency type normal 





CREATE TABLE a (
 id serial,
 name text
);

CREATE view a1 as select * FROM a;
CREATE view a2 as SELECT * FROM a1;

CREATE OR REPLACE FUNCTION a3 () RETURNS INTEGER AS
$$
select MAX (id) FROM a2;
$$
LANGUAGE 'sql';


DROP VIEW  a2;
DROP VIEW  a1;
SELECT * FROM a3();


Regards

Reply via email to