pg to git converter
Project description
pg-export - pg to git converter
Export structure of database to object files for control version system
structure of result directories
casts:
...
data:
schema1:
table1.sql
schema2:
...
extensions:
...
publications:
...
schemas:
schema1:
aggregate:
...
domains:
...
functions:
...
operators:
...
sequences:
...
tables:
...
triggers:
...
types:
...
views:
...
schema2
...
installation
pip install pg-export
usage
usage: pg_export [--help] [--version] [--clean] [--ignore-version] [--echo-queries] [-h HOST] [-p PORT] [-U USER] [-W PASSWORD] [-j JOBS] [-z TIMEZONE] [-n SCHEMA] [-N EXCLUDE_SCHEMA] [-d DBNAME] [--skip-sequence-increment] [dbname] out_dir
Export structure of database to object files for control version system
positional arguments:
dbname source database name
out_dir directory for object files
options:
--help show this help message and exit
--version show program's version number and exit
--clean clean out_dir if not empty (env variable PG_EXPORT_AUTOCLEAN=true)
--ignore-version try exporting an unsupported server version
--echo-queries echo commands sent to server
-h HOST, --host HOST host for connect db (env variable PGHOST=<host>)
-p PORT, --port PORT port for connect db (env variable PGPORT=<port>)
-U USER, --user USER user for connect db (env variable PGUSER=<user>)
-W PASSWORD, --password PASSWORD
password for connect db (env variable PGPASSWORD=<password>)
-j JOBS, --jobs JOBS number of connections
-z TIMEZONE, --timezone TIMEZONE
timezone for constraints, partitions etc.
-n SCHEMA, --schema SCHEMA
dump the specified schema(s) only
-N EXCLUDE_SCHEMA, --exclude-schema EXCLUDE_SCHEMA
do NOT dump the specified schema(s)
-d DBNAME, --dbname DBNAME
source database name (env variable PGDATABASE=<dbname>)
--skip-sequence-increment
do not export sequences increment (env variable PG_EXPORT_SKIP_SEQUENCE_INCREMENT=true)
examples
pg_export -h 127.0.0.1 -p 5432 -U postgres -j 4 my_database /tmp/my_database_structure/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pg_export-3.13.1.tar.gz
(32.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pg_export-3.13.1.tar.gz.
File metadata
- Download URL: pg_export-3.13.1.tar.gz
- Upload date:
- Size: 32.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
947fcfba1ed56a3801dce9c426a451bf682beccf4294b16ad3521ff0761dd9e0
|
|
| MD5 |
f6b0b7397a6e8c60e770da129e070217
|
|
| BLAKE2b-256 |
65f3a4e9acef25a6f2c757432a2089b6c376c1bc0c4c1380d7b0e9655b196e55
|
File details
Details for the file pg_export-3.13.1-py3-none-any.whl.
File metadata
- Download URL: pg_export-3.13.1-py3-none-any.whl
- Upload date:
- Size: 54.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f32d9623ab4805e2aa7b9370775c6e3227e228968cce94224a0ce9f0238c23f
|
|
| MD5 |
3577254abb2bd13026c7eb7e0750e67d
|
|
| BLAKE2b-256 |
b86a34eea9d234258cdda0339c825dc574fa8811cce12ef53325e49f2d7caeab
|