-
-
Save fiftin/46937cdea7532991e98c to your computer and use it in GitHub Desktop.
Convert PostgreSQL data to SQLite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sed -f | |
# add begin transaction | |
1s/^SET .*$/END;\nBEGIN;\n/ | |
1s/^-- .*$/END;\nBEGIN;\n/ | |
1s/^/BEGIN;\n/ | |
# remove configuration settings | |
/^SET /d | |
# remove comments | |
/^--/d | |
# remove sequence values | |
/^SELECT pg_catalog.setval/d | |
# add end transaction | |
$s/$/\nEND;\n/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment