Splits a postgresql dump with multiple databases into respective SQL files
Go to file
Magnus Åhall aa1ead78e1 Bumped to v5 2024-04-24 16:32:51 +02:00
.gitignore Initial commit 2024-04-23 20:17:43 +02:00
README.md Update README.md 2024-04-23 19:08:44 +00:00
flag.go Added -list option 2024-04-23 20:24:40 +02:00
go.mod Initial commit 2024-04-23 20:17:43 +02:00
main.go Bumped to v5 2024-04-24 16:32:51 +02:00

README.md

Usage

pgsplit takes a PostgreSQL dump with multiple databases through STDIN and extracts them to the current directory, named with the database name and an .sql extension.

pgsplit -list prints the database names contained in the SQL dump.

pgsplit extracts all databases.

pgsplit -include-all -except foo -except bar extracts all databases except for foo and bar.

pgsplit -exclude-all -except foo -except bar extracts only databases foo and bar.