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] [--echo-queries] [-h HOST] [-p PORT] [-U USER] [-W PASSWORD] [-j JOBS] [-z TIMEZONE] database out_dir
positional arguments:
database 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)
--echo-queries echo commands sent to server
-h HOST, --host HOST host for connect db (env variable PG_HOST=<host>)
-p PORT, --port PORT port for connect db (env variable PG_PORT=<port>)
-U USER, --user USER user for connect db (env variable PG_USER=<user>)
-W PASSWORD, --password PASSWORD
password for connect db (env variable PG_PASSWORD=<password>)
-j JOBS, --jobs JOBS number of connections
-z TIMEZONE, --timezone TIMEZONE
timezone for constraints, partitions etc.
examples
pg_export -h 127.0.0.1 -p 5432 -U postgres -j 4 my_database /tmp/my_database_structure/
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.7.4.tar.gz
(51.8 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
pg_export-3.7.4-py3-none-any.whl
(87.9 kB
view details)
File details
Details for the file pg-export-3.7.4.tar.gz.
File metadata
- Download URL: pg-export-3.7.4.tar.gz
- Upload date:
- Size: 51.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.0.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74013f5a1cfa3ea84a7641935d62994e365514cf7c2ee9fe1585b43f6db163f8
|
|
| MD5 |
efb12f95d8427eceae746d0752ec1f5c
|
|
| BLAKE2b-256 |
cf86b4b78711d9f7dc503b8480dd64af61a27be085072eeb70e156a7b6bf5513
|
File details
Details for the file pg_export-3.7.4-py3-none-any.whl.
File metadata
- Download URL: pg_export-3.7.4-py3-none-any.whl
- Upload date:
- Size: 87.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.0.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2eeab52bf95efdde0e940b5223120c2bd38ec2bad6b194c5251486a64ce00ce
|
|
| MD5 |
f51df4d280b9844059464fead7d295f1
|
|
| BLAKE2b-256 |
1b6dc45821066220107ea5fbbb38e7529ab5c5737637c3a7db4f95e88befdb09
|