How can I drop fk_bar if its table tbl_foo exists in Postgres and if the constraint itself exists?
I tried
ALTER TABLE IF EXISTS tbl_foo DROP CONSTRAINT IF EXISTS fk_bar;
But that gave me an error when tbl_foo does not exist. It executes successfully if the table does exist.
select version()to find out)