Skip to main content

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.8.0.tar.gz (30.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pg_export-3.8.0-py3-none-any.whl (51.9 kB view details)

Uploaded Python 3

File details

Details for the file pg-export-3.8.0.tar.gz.

File metadata

  • Download URL: pg-export-3.8.0.tar.gz
  • Upload date:
  • Size: 30.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for pg-export-3.8.0.tar.gz
Algorithm Hash digest
SHA256 15dc9ffb74267322cc2818eda20a0377822d1db2e920e37a09fd6d2994a6fe4d
MD5 73954b53c6921278c2f5c5eb0ba44849
BLAKE2b-256 010c969d8ca108221de0f6d62ddf51715b8c69ee26817b1e9efa18635640da33

See more details on using hashes here.

File details

Details for the file pg_export-3.8.0-py3-none-any.whl.

File metadata

  • Download URL: pg_export-3.8.0-py3-none-any.whl
  • Upload date:
  • Size: 51.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for pg_export-3.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 474b1ba105d85ca44a99e5e6de95df364dc88a8b25493593b5f1ad7b7872dc0a
MD5 6f8bcaab68561e617e16c65f3df67d2c
BLAKE2b-256 ac7032ed4214eb20a436d518acd8b224147b07247d8f9a86be5c059b5f3868ba

See more details on using hashes here.

Release history Release notifications | RSS feed

3.13.1

2 files

3.13.0

2 files

3.12.0

2 files

3.11.0

2 files

3.10.0

2 files

3.9.0

2 files

3.8.2

2 files

3.8.1

2 files

This release

3.8.0 This release

2 files

3.7.4

2 files

3.7.3

2 files

0.6.2

1 file

0.6.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page