Is there a way to have the "CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog" directive excluded in the result of a pg_dump?
pg_dump -Fp -O 1.2.0 > /directory/1.2.0.sql
Yes, you can use sed
to comment that specific line out:
pg_dump -Fp -O 1.2.0 | \
sed -e 's/CREATE EXTENSION IF NOT EXISTS plpgsql/-- CREATE EXTENSION IF NOT EXISTS plpgsql/g' \
> /directory/1.2.0.sql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With