Skip to content

Instantly share code, notes, and snippets.

@jsugarman
Created October 19, 2018 11:47
Show Gist options
  • Save jsugarman/cb65a3817063e1d90005217f77cba949 to your computer and use it in GitHub Desktop.
Save jsugarman/cb65a3817063e1d90005217f77cba949 to your computer and use it in GitHub Desktop.
fix cccd dump file
# find and replace search path in ADP dump file
gunzip -3 -f adp_gamma_dump.psql.gz
fgrep 'search_path' adp_gamma_dump.psql -m1
sed -i -e "s/SELECT pg_catalog.set_config('search_path', '', false)/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true)/" adp_gamma_dump.psql
fgrep 'search_path' adp_gamma_dump.psql -m1
gzip adp_gamma_dump.psql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment