Integer Array Casting in PostgreSQL

1
2
3
4
5
6
-- Rule: "_DELETE" ON sometable
-- DROP RULE "_DELETE" ON sometable;

CREATE OR REPLACE RULE "_DELETE" AS
    ON DELETE TO sometable DO INSTEAD  DELETE FROM _sometable
 WHERE _sometable.account_id = old.account_id AND (old.domain_id = ANY ((( SELECT get_visible_domains('DELETE'::text) AS get_visible_domains)::integer[])));
This entry was posted in Database, PostgreSQL. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


× 8 = seventy two