Compare commits
5 commits
Author | SHA1 | Date | |
---|---|---|---|
|
aa1ead78e1 | ||
|
9367bab359 | ||
2b240d873b | |||
2e4b71e688 | |||
|
45ccbe091c |
2 changed files with 14 additions and 3 deletions
11
README.md
Normal file
11
README.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# 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.
|
4
main.go
4
main.go
|
@ -9,7 +9,7 @@ import (
|
|||
"slices"
|
||||
)
|
||||
|
||||
const VERSION = "v4"
|
||||
const VERSION = "v5"
|
||||
const MAXLINE = 1048576
|
||||
|
||||
type Db struct {
|
||||
|
@ -72,7 +72,7 @@ func main() {
|
|||
continue
|
||||
}
|
||||
|
||||
fmt.Printf("Database %s\n", db.Name)
|
||||
fmt.Printf("Extracting %s\n", db.Name)
|
||||
if flagList {
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue