data2pg
Migration framework for discovering, copying, and comparing non-PostgreSQL database content through foreign data wrappers.
data2pg · Migration framework for discovering, copying, and comparing non-PostgreSQL database content through foreign data wrappers.
Overview
| Relationships | |
|---|---|
| Requires | dblink |
Usage
Sources:
- Official upstream README
- Official extension control file (data2pg.control)
- Official extension SQL (data2pg–0.3.sql)
data2pg — Migration framework for discovering, copying, and comparing non-PostgreSQL database content through foreign data wrappers. Use it when moving, transforming, or integrating the corresponding data from PostgreSQL. Its extension dependencies must be installed and validated first.
Core Workflow
Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.
Important Objects
add_step_parent(p_batchName TEXT, p_step TEXT, p_parent_step TEXT)is an extension function and returnsINT.assign_fkey_checks_to_batch(p_batchName TEXT, p_schema TEXT, p_table TEXT, p_fkey TEXT DEFAULT NULL)is an extension function and returnsINT.assign_index_to_batch(p_batchName TEXT, p_schema TEXT, p_table TEXT, p_object TEXT)is an extension function and returnsINTEGER.assign_sequence_to_batch(p_batchName TEXT, p_schema TEXT, p_sequence TEXT)is an extension function and returnsINTEGER.assign_sequences_to_batch(p_batchName TEXT, p_schema TEXT, p_sequencesToInclude TEXT, p_sequencesToExclude TEXT)is an extension function and returnsINT.assign_table_checks_to_batch(p_batchName TEXT, p_schema TEXT, p_table TEXT)is an extension function and returnsINTEGER.assign_table_part_to_batch(p_batchName TEXT, p_schema TEXT, p_table TEXT, p_partId TEXT)is an extension function and returnsINTEGER.assign_table_part_to_batch(p_batchName TEXT, p_schema TEXT, p_table TEXT, p_partNum INTEGER)is an extension function and returnsINTEGER.assign_table_to_batch(p_batchName TEXT, p_schema TEXT, p_table TEXT)is an extension function and returnsINTEGER.assign_tables_checks_to_batch(p_batchName TEXT, p_schema TEXT, p_tablesToInclude TEXT, p_tablesToExclude TEXT)is an extension function and returnsINTEGER.assign_tables_to_batch(p_batchName TEXT, p_schema TEXT, p_tablesToInclude TEXT, p_tablesToExclude TEXT)is an extension function and returnsINTEGER.check_schema(p_schema TEXT)is an extension function and returnsvoid.complete_migration_configuration(p_migration TEXT)is an extension function and returnsINT.create_migration(p_migration TEXT, p_sourceDbms TEXT, p_extension TEXT, p_serverOptions TEXT, p_userMappingOptions TEXT, p_userHasPrivileges BOOLEAN DEFAULT false, p_importSchemaOptions TEXT DEFAULT NULL)is an extension function and returnsINTEGER.
Requirements and Caveats
- The reviewed control file declares default version
0.7. - Install the confirmed extension dependencies first:
dblink. - The control file marks the extension as non-relocatable.
- The control file requires a superuser for installation.
- Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.