Skip to main content

PostgreSQL metadata grabber and comparer

Project description

PostgreSQL metadata (DDL) grabber and comparer

Dependencies

Installation

pip install psycopg2 pg-metadata

Usage

1 ) Create file _Connect.py with connection params:

# Source database for comparing
# Database for grabbing
PG_SOURCE = {
    "host"      : "",
    "port"      : 5432,
    "database"  : "",
    "username"  : "",
    "password"  : "",
}

# Target database for comparing
PG_TARGET = {
    "host"      : "",
    "port"      : 5432,
    "database"  : "",
    "username"  : "",
    "password"  : "",
}

# Excluded namespaces
EXCLUDE_SCHEMAS = [
    "information_schema",
    "pg_catalog",
    "pg_temp",
    "pg_temp_1",
    "pg_toast",
    "pg_toast_temp_1"
]

# Path with compare folder
PATH_COMPARE = "./compare"

2 ) To grab database metadata run zzz_Grabber.py.

3 ) To compare databases run zzz_Compare.py.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pg-metadata, version 0.6.4
Filename, size File type Python version Upload date Hashes
Filename, size pg_metadata-0.6.4.tar.gz (14.5 kB) File type Source Python version None Upload date Hashes View
Filename, size pg_metadata-0.6.4-py3-none-any.whl (26.7 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page