Skip to content

Releases: darold/ora2pg

Version 24.1

08 Sep 14:02
Compare
Choose a tag to compare

2023 09 08 - v24.1

This release fix several issues reported since last release and adds some new features and improvements.

  • Add export of indexes created automatically by the Automatic Indexing feature of Oracle 19c
  • Replace "set feedback off" by "\set QUIET on;" and "set pagesize 0" with "\pset pager off". Thanks to Martin Gerhardy for the suggestion.
  • Always add package name into search_path of packages functions. Thanks to janopha for the report.
  • Allow to specify a password file to set PG_PWD at PostgreSQL database connection. If the specified file exists on the system, Ora2Pg will read the first line to get the password at each call of send_to_pgdb(). It can be useful in some situation where the password change during data migration. Thanks to Marius Hope for the feature request.
  • Added option --dump_as_json and fixed some json output errors. Thanks to Martin Gerhardy for the patch.

Here is the full list of others changes with acknowledgements:

  • Fix schema prefixing of type created in packages stored procedures. Thanks to janopha for the report.
  • Fix perl function get_schema_condition() to use quote_ident() in generated SQL filters. Thanks to franxav06 for the report.
  • Attempt to better test the not null constraint count in Oracle.
  • Fix regression with PSQL_RELATIVE_PATH. Thanks to Ryan Taylor for the report.
  • Do not add the partition key to PK if DISABLE_PARTITION is enabled. Thanks to pavel-moskotin-db for the report.
  • Filter list of indexes on name instead of the GENERATED column because we are missing the ones that have been created automatically by the Automatic Indexing feature of Oracle 19c. Thanks to Franck Pachot for the report.
  • Fix incompleteness in GRANT action, add grant usage on schema to owner and users. Thanks to elexus for the report.
  • Apply missing --blob_to_lo to import_all.sh script.
  • Fix regression in MySQL hash partitions export. Thanks to Shubham Dabriwala for the report.
  • Fix Oracle INTERVAL data export with negative value. Thanks to shubham-yb for the report.
  • Fix double count of not null constraints for TEST action. Thanks to Simon Pane for the patch.
  • Fix replacement of Oracle sys_refcursor in function return type.
  • Fix replacement of SQL script setting from Oracle.
  • Make scripts executable. Thanks to Martin Gerhardy for the patch.
  • Exclude data pump SYS_EXPORT_SCHEMA_.* tables from Oracle export.
  • ora2pg: use env based shebang for perl. Thanks to Martin Gerhardy for the patch.
  • Add unsupported clause message for PRAGMA AUTONOMOUS_TRANSACTION when it is not rewritten by Ora2Pg. Thanks to Martin Gerhardy for the patch.
  • Allow schema specific definitions of partitioning columns. Thanks to Martin Gerhardy for the patch.
  • Fixed invalid variable name in read_grant_from_file. Thanks to Martin Gerhardy for the patch.
  • Fix not double quoted column in alter set not null column statement. Thanks to leonteq-reisg for the patch.
  • Bug fixes and special treatment for Types with body. Thanks to Martin Gerhardy for the patch.
  • Avoid redundant definition of the version. Thanks to Martin Gerhardy for the patch.
  • Fix a MySQL exception when the column type is ENUM for version < 5.7. Thanks to Code-UV for the report.

Version 24.0

05 Jul 19:56
Compare
Choose a tag to compare

2023 07 05 - v24.0

This major release adds support to migration of SQL Server database to
PostgreSQL. It also fixes several issues reported since past height months
and adds some new features and improvements.

  • Enable the use of ALLOW/EXCLUDE directive with SHOW_* reports and throw
    a fatal error if global filters in ALLOW/EXCLUDE are set.
  • Add replacement of DBMS_LOCK.SLEEP with pg_sleep
  • Split estimate cost details per function/procedure/and package function.
  • Add cmin, cmax, ctid to reserved keywords list.
  • Add cost for presence of ADD CONSTRAINT in PLSQL code. It needs constraint
    name stability.
  • Allow COPY and TABLE type to use the NULLIF construct. Thanks to Luke Davies
    for the patch.
  • Add new SEQUENCE_VALUES export type to export DDL to set the last values
    of sequences from current Oracle database last values like the following
    statements: ALTER SEQUENCE departments_seq START WITH 290;
    Thanks to sergey grinko for the feature request.
  • Add replacement of Oracle variable : varname into PG :'varname'.
  • Add SQL Server migration to Ora2Pg. Most of the SQL Server objects are
    supported as well as data export. Translation of the TSQL stored
    procedures to plpgsql is complicated because of the lack of statement
    separator in TSQL but as usual Ora2Pg is doing is best to do as much
    work as possible. Migration assessment is also possible with SQL Server
    database. There is some dedicated configuration directives added to
    ora2pg.conf.
  • Add support to MySQL PARTITION BY KEY() with a translation to HASH
    partitioned table using the PK/UK definition of the table or the
    columns specified in the KEY() clause. Thanks to Shubham Dabriwala
    for the report.
  • Make EXPORT_INVALID configuration directive works with TRIGGER export.
    Until now disabled triggers were not exported, setting EXPORT_INVALID
    to 1 will force the export of disabled triggers. Thanks to chetank-yb
    for the report.
  • Add support of MySQL generated default value on update. For example:
      CREATE TABLE t1 (
        dt DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
      );
    
    Ora2Pg will translate this syntax into a trigger on the table to force
    the value of the column on an update event.
    Thanks to heysky for the report.
  • Add translation of ST_GEOMETRY data type to PostGis geometry datatype.
  • Replace ROWNUM in target list with a row_number() over () clause. Thanks
    to Rui Pereira for the report.

New configuration directives:

  • Add CLOB_AS_BLOB configuration directive to treat CLOB as BLOB when
    exporting data. When enabled Ora2Pg will apply same behavior on CLOB
    than BLOB with BLOB_LIMIT setting. This could be useful if you have
    large CLOB data. Enabled by default. Thanks to Omar Mebarki for the patch.
  • Add configuration directive ST_GEOMETRYTYPE_FUNCTION to be able to set the
    function to use to extract the geometry type from a ST_Geometry column.
    Default: ST_GeometryType, example it should be set to sde.ST_GeometryType
    for ArcSDE. Thanks to Albert88373 for the report.
  • Add four new configuration directive to be able to change or prefix the
    functions used to extract information from ST_Geometry object and values.
    • ST_SRID_FUNCTION: Oracle function to use to extract the srid from
      ST_Geometry meta information. Default: ST_SRID, for example it should be
      set to sde.st_srid for ArcSDE.
    • ST_DIMENSION_FUNCTION: Oracle function to use to extract the dimension
      from ST_Geometry meta information. Default: ST_DIMENSION, for example it
      should be set to sde.st_dimention for ArcSDE.
    • ST_ASBINARY_FUNCTION: Oracle function to used to convert an ST_Geometry
      value into WKB format. Default: ST_ASBINARY, for example it should be set
      to sde.st_asbinary for ArcSDE.
    • ST_ASTEXT_FUNCTION: Oracle function to used to convert an ST_Geometry
      value into WKT format. Default: ST_ASTEXT, for example it should be set
      to sde.st_astext for ArcSDE.
      Thanks to Albert88373 for the report.
  • Add INSERT_ON_CONFLICT configuration directive. When enabled this instruct
    Ora2Pg to add an ON CONFLICT DO NOTHING clause to all INSERT statements
    generated for this type of data export. Thanks to Clemens Rieder for the
    feature request.

Backward compatibility:

  • Change the behavior of CASE_INSENSITIVE_SEARCH to allow the use of a
    collation instead of the citext extension. To disable the feature the
    value none can be used. If the migration is not MSSQL this feature is
    disabled.
  • Remove PREFIX_PARTITION configuration directive, it is now replaced by
    the RENAME_PARTITION directive. Previous behavior was to construct the
    partition name from the table name, the partition name and the sub
    partition name if any. The problem is that we often reach the max length
    for an object name and this leads to duplicate partition name. Now, when
    RENAME_PARTITION is enabled the partition tables will be renamed
    following rules:
        <tablename>_part<pos>
    
    where "pos" is the partition number. For subpartition this is:
       <tablename>_part<pos>_subpart<pos>
    
    If this is partition/subpartition default:
        <tablename>_part_default
        <tablename>_part<pos>_subpart_default
    
    This change will break backward comaptibilty, if PREFIX_PARTITION is
    still set, it will simply enable RENAME_PARTITION.
  • Set START value to MINVALUE when a sequence is cycled and that the START
    value is upper that MAXVALUE. Thanks to Shane Borden for the report.

Here is the full list of changes and acknowledgements:

  - Fix MODIFY_STRUCT that was not working with MySQL. Thanks to Code-UV for
    the report.
  - Fix license string in Makefile.PL. Thanks to RodRaen for the report.
  - Do not remove non alphanumeric character in index name. Thanks to gwidt
    for the report.
  - Reorder trigger event when the update of column is not the last one. Thanks
    to tayalarun1 for the report.
  - Fix export of MySQL function containing special characters and white spaces
    in names. Thanks to Shubham Dabriwala for the report.
  - Fix grant export for partitions. Thanks to elexus for the report.
  - Add some other transformation for sqlplus/psql scripts.
  - Remove comma as possible separator for values in DEFINED_PK, it was
    preventing the use of a function with multiple parameters.
  - Fix export of geometry tables when PG_SCHEMA is set.
  - Add rewriting of some sqlplus settings to psql settings.
  - Fix TABLESPACE export for partitioned tables. Thanks to elexus for the
    report.
  - Fix for Issue #1637. Thanks to Simon Pane for the patch.
  - Fix typo in --init_project directories tree generation for sequences
    values.
  - Fix alias in view target list for function call without alias defined in
    MySQL export. Thanks to Shubham Dabriwala for the report.
  - Fix Mysql procedure export when a datatype with precision is used in
    parameter list. Thanks to Shubham Dabriwala for the report.
  - Fix collation on string default values. Thanks to Shubham Dabriwalafor
    the report.
  - Exclude recycle bin object from ALL_TAB_COLUMNS lookup. Thanks to Dave
    Betterton for the report.
  - Fix data types translation (TINYINT|SMALLINT|MEDIUMINT|INTEGER|BIGINT|INT)
    for MySQL table export. Thanks to Shubham Dabriwala for the report.
  - Do not export synonym destination table with table_owner when EXPORT_SCHEMA
    is disabled. Thanks to Priyanshi Gupta for the report.
  - Fully qualify calls to get_sequence_last_values() when PG_SCHEMA is set.
    Thanks to Marius Hope for the report.
  - Fix regression on exporting view as table when VIEW_AS_TABLE contains
    regexp. Thanks to Neil Bower for the report.
  - Fix missing execution of initial command statements at start of TEST_DATA
    action and on both side, those applying to source and destination. Thanks
    to Petter Jacobsen for the report.
  - Fix script to get sequence last value with TEST action. Thanks to franxav06
    for the patch.
  - Prepend PERFORM before call to DBMS_OUTPUT.* when USE_ORAFCE is enabled.
  - Disable USE_ORAFCE when export type is SHOW_REPORT.
  - Extending the enhancement in Pull Request #1621 to the Oracle_FDW user
    mapping. Thanks to Simon Pane for the patch.
  - Changed prefix string to "DIFF:" in test report. Thanks to Simon Pane for
    the patch.
  - Fix cases where %ROWCOUNT was not correctly replaced. Thanks to Rui Pereira
    for the report.
  - Fix parsing of ORACLE_DSN when creating foreign server in COPY mode. Thanks
    to Luke Davies for the report.
  - Fix for Issue #1622, #1627. Thanks to Simon Pane for the patch.
  - Fix index creation with DESC order in COPY action when DROP_INDEXES is
    enabled. Thanks to Luke Davies for the report.
  - Fix for Issue #1610, #1612, #1617 and #1381. Thanks to Simon Pane for the
    patch.
  - Fix typo in sqlnet.ora name (was sqlnet.or). Thanks to Martin Nash for the
    patch.
  - Fix data export, REPLACE_QUERY was not applied. Thanks to Bachev Constantin
    for the report.
  - Fix call to replace_sys_context().
  - Fix timestamp(n) data type translation.
  - Remove use of column GENERATION_EXPRESSION for MySQL version < 5.7.0. Thanks
    to Hans Choi for the report.
  - Fix conversion of DATE datatype to timestamp(0) instead of timestamp. Thanks
    to Akhil Reddy for the report.
  - Add NVARCHAR/NCHAR defaut convertion data types to DATA_TYPE configuration
    directive in ora2pg.conf comments. Thanks to Akhil Reddy for the report.
  - Rename method _get_partitions_type function into...

Version 23.2

08 Oct 06:39
Compare
Choose a tag to compare

2022 10 08 - v23.2

This release fix several issues reported since past height months and
adds some new features and improvements.

  • Add export of MySQL KEY and LINEAR KEY partitioning, translated as HASH
    partitioning.
  • Allow export of object with dollar sign is his name.
  • Add export of CHECK constraints for MySQL >= 8.0.
  • Add Functional/Expression indexes export from MYSQL.
  • Add export of MySQL virtual column. Thanks to Shubham Dabriwala for the
  • Remove scale and precision of a numeric if the scale is higher than the
    precision. PostgreSQL does not support decimal/numeric attributes where
    the scale is explicitly higher than the precision.
  • Add command line option --drop_if_exists to add statement to drop objects
    before creation if it exists. It corresponds to the DROP_IF_EXISTS
  • Add option -C | --cdc_file to be able to change the name of the default file
    used to store/read SCN per table during export. Default is TABLES_SCN.log in
    the current directory. This is the file written by the --cdc_ready option.
  • Add multiprocess to count rows in PostgreSQL tables (TEST_COUNT) using -P
    command line option.
  • Add support to PostgreSQL 14 procedure with out parameters.
  • Set default PostgreSQL database target version to 14.

New configuration directives:

  • Add configuration directive MVIEW_AS_TABLE and command line option
    --mview_as_table to set which materialized view to export as table.
    By default none. Value must be a list of materialized view name or
    regexp separated by space or comma. If the object name is a materialized
    view and the export type is TABLE, the view will be exported as a create
    table statement. If export type is COPY or INSERT, the corresponding data
    will be exported.
  • Add configuration variable FDW_IMPORT_SCHEMA to rename the schema where
    foreign tables for data migration will be created. If you use several
    instances of ora2pg for data migration through the foreign data wrapper,
    you might need to change the name of the schema for each instance.
    Default: ora2pg_fdw_import
  • Add TRANSFORM_VALUE configuration directive to apply an expression when
    retrieving data from Oracle. For example:
    TRANSFORM_VALUE CLOB_TABLE[CHARDATA:translate("CHARDATA", chr(0), ' ')]
    to replace all Oracle char(0) in a string by a space character.
  • Add EXCLUDE_COLUMNS configuration directive. Unlike MODIFY_STRUCT
    that is used to redefine a table structure, this directive allow
    to specify a list of columns per table that must be excluded from
    the export. For example:
    EXCLUDE_COLUMNS T1(nocol1,nocol2) T2(nocol1,nocol2)
  • Add new configuration directive EXPORT_GTT to export Oracle Global Temporary
    Table using syntax recognized by the pgtt extension. For more information see
    https://github.com/darold/pgtt Default is to not export global temporary
    table as they are not supported natively by PostgreSQL.
  • Add new configuration option NO_EXCLUDED_TABLE. By default Ora2Pg exclude
    from export some Oracle "garbage" tables that should never be part of an
    export. This behavior generates a lot of REGEXP_LIKE expressions which are
    slowing down the export when looking at tables. To disable this behavior
    enable this directive, you will have to exclude or clean up later by
    yourself the unwanted tables. The regexp used to exclude the table are
    defined in the array @EXCLUDED_TABLES in lib/Ora2Pg.pm. Note this is behavior
    is independent to the EXCLUDE configuration directive.

Backward compatibility:

  • Force rewrite of all invalid date starting with zero year 0000 into 1970-01-01
    when it is a default value and NULL for data. Old behavior was to only replace
    0000-00-00 date.
  • Until now there was a lot of untranslated call to TRUNC(date) because
    Ora2Pg is unable to detect that the parameter is a date or a number.
    The problem is that Oracle has TRUNC(number) too and Ora2Pg try to not
    apply the transformation if there is a doubt. In most of the migration
    have met very few TRUNC(number) so now all call to TRUNC()
    will be converted to date_trunc(). There must be false positive rewrite
    but this should be far less work than the actual situation.

Here is the full list of changes and acknowledgements:

  - Fixed PostgreSQL "relation not found error" in _dump_fdw_table(), PostgreSQL
    search_path was not being used. Thanks to James Schriever for the patch.
  - Fix year and month quoting as reserved words when they are used as aliases.
    Thanks to duursma for the report.
  - Fix conversion of to_number(substr(...)) when PG substr() return empty
    string where Oracle return NULL which make the conversion to numeric fail.
    The fix using (nullif(substr(...), )::numeric) only concern TABLE export.
    Thanks to Menelaos Perdikeas for the report.
  - Add export of MySQL KEY and LINEAR KEY partitioning, now exported as HASH
    partitioning. Thanks to Sanyam Singhal for the report.
  - Remove $ sign from characters that require object name quoting.
  - Fix export of objects with the $ sign in the name. Thanks to yano-rxa and
    duursma for the report.
  - Prevent translation of EXEC when used as alias. Thanks to Rui Pereira for
    the report.
  - Fix MySQL enum data type export with regression introduced by commit 24a476.
    Thanks to Shivansh Gahlot for the report.
  - Rename ORACLE_FDW_TRANSFORM to TRANSFORM_VALUE to apply in all case an
    expression when retrieving data from Oracle. For example:
      TRANSFORM_VALUE   CLOB_TABLE[CHARDATA:translate("CHARDATA", chr(0), ' ')]
    to replace all Oracle char(0) in a string by a space character.
  - Fix add_month() translation failing with some use cases. Thanks to duursma
    for the report.
  - Add export of CHECK constraints for MySQL >= 8.0. Thanks to Rahul
    Barigidad for the report.
  - Fix MySQL unsigned numeric data type conversion. Thanks to Rahul Barigidad
    for the report.
  - Add Functional/Expression indexes fail while exporting from MYSQL. Thanks to
    Shubham Dabriwala for the report.
  - Fix export of descending indexes for MySQL. Thanks to Shubham Dabriwala for
    the report.
  - Force MySQL auto increment sequence to start at 1 when value is 0.
    Thanks to Rahul Barigidad for the report.
  - Fix conversion of MySQL decimal(p,s) to keep the original datatype
    instead of use of real or double.
  - Add export of MySQL virtual column. Thanks to Shubham Dabriwala for the
    report.
  - Fix export of MySQL function with return clause only. Thanks to Shubham
    Dabriwala for the report.
  - Remove scale and precision of a numeric if the scale is higher than the
    precision. PostgreSQL does not support decimal/numeric attributes where
    the scale is explicitly higher than the precision. Thanks to Rahul Barigidad
    for the report.
  - Fix export of comment for views. Thanks to gh-k-murata for the report.
  - Add command line option --drop_if_exists to add statement to drop objects
    before creation if tehy exists. It corresponds to the DROP_IF_EXISTS
    configuration directive. Thanks to Yoni Sade for the feature request.
  - Add option --mview_as_table to documentation.
  - Add configuration directive MVIEW_AS_TABLE and command line option
    --mview_as_table to set which materialized view to export as table.
    By default none. Value must be a list of materialized view name or
    regexp separated by space or comma. If the object name is a materialized
    view and the export type is TABLE, the view will be exported as a create
    table statement. If export type is COPY or INSERT, the corresponding data
    will be exported.
  - Disable EXPORT_GTT when export type is not TABLE. Thanks to gh-k-murata for
    the report.
  - Fix generated external servers wrongly placed in a schema. Thanks to duursma
    for the report.
  - Add configuration variable FDW_IMPORT_SCHEMA to rename the schema where
    foreign tables for data migration will be created. If you use several
    instances of ora2pg for data migration through the foreign data wrapper,
    you might need to change the name of the schema for each instance. Default
    to ora2pg_fdw_import. Thanks to James Schriever for the feature request.
  - Fix wrong conversion of rownum clause when a subquery is used. Thanks to
    Rui Pereira for the report.
  - Escape comma and backslashes in BFILE data export. Thanks to duursma for
    the patch.
  - Fix possible infinite loop in Oracle outer join parsing. Thanks a lot to
    yano-rxa for the report.
  - Remove privileges default settings on views exported from SYNONYMs
  - Add support for Rectangle geometry type. Thanks to duursma for the patch.
  - Fix double replacement of IS NULL/IS NOT NULL when NULL_EQUAL_EMPTY is
    enabled.
  - Add CHECK not null only constraints to not null constraint count.
  - Fix CHECK NOT NULL only constraints that was not exported by generating
    NOT NULL constraints instead. They are exclude from the count of CHECK
    constraint as suggested by Florent Jardin but a count difference persist
    for NOT NULL constraints.
  - Fix TYPE export when SCHEMA and PRESERVE_CASE have different values. Thanks
    to Florent Jardin for the report.
  - Fix custom exception replacement. Thanks to Rui Pereira for the report.
  - Fix Collection and Polygon geometry INTERNAL export.
    Thanks to duursma for the patch.
  - Fix export of efile with parenthesis. Thanks to duursma for the report.
  - Fix wrong column indices used in spatial index extraction. Thanks to duursma
    for the report.
  - Fix call of ST_GeomFromText() with WKT export. Thanks to duursma for the
    report.
  - Disable USE_LOB_LOCATOR with WKT geometry export type, ST_GeomFromTe...

Version 23.1

10 Feb 19:09
Compare
Choose a tag to compare

2022 02 10 - v23.1

This release fix several issues reported since past four months and
adds some new major features and improvements.

  • Add use of greatest/least functions from new version of Orafce when
    required to return NULL on NULL input like Oracle.
  • ALLOW and EXCLUDE configuration values can now be read from a file.
    Use -a filename or -e filename to specify the list of tables that need
    to be filtered. This is useful if you have a lot of table to filter.
  • Add possibility to use of System Change Number (SCN) for data export or
    data validation by providing a specific SCN. It can be set at command
    line using the -S or --scn option. You can give a specific SCN or if you
    want to use the current SCN at first connection time set the value to
    'current'. To use this last case the connection user must have the role
    "SELECT ANY DICTIONARY" or "SELECT_CATALOG_ROLE", the current SCN is
    looked at the v$database view.
    Example of use:
    ora2pg -c ora2pg.conf -t COPY --scn 16605281
    This adds the following clause to the query used to retrieve data for example:
    AS OF SCN 16605281
    You can also use th --scn option to use the Oracle flashback capability by
    specifying a timestamp expression instead of a SCN. For example:
    ora2pg -c ora2pg.conf -t COPY --scn "TO_TIMESTAMP('2021-12-01 00:00:00', 'YYYY-MM-DD HH:MI:SS')"
    This will add the following clause to the query used to retrieve data:
    AS OF TIMESTAMP TO_TIMESTAMP('2021-12-01 00:00:00', 'YYYY-MM-DD HH:MI:SS')
    or for example to only retrieve yesterday's data:
    ora2pg -c ora2pg.conf -t COPY --scn "SYSDATE - 1"
  • Add json output format to migration assessment. Thanks to Ted Yu for the patch.
  • Add new TO_CHAR_NOTIMEZONE configuration directive to remove any timezone
    information into the format part of the TO_CHAR() function. Disabled by default.
    Thanks to Eric Delanoe for the report.
    Note that the new default setting breaks backward compatibility, old behavior
    was to always remove the timezone part.
  • Add new configuration directive FORCE_IDENTITY_BIGINT. Usually identity
    column must be bigint to correspond to an auto increment sequence so
    Ora2Pg always force it to be a bigint. If, for any reason you want
    Ora2Pg to respect the DATA_TYPE you have set for identity column then
    disable this directive.
  • Add command line option --lo_import. By default Ora2Pg imports Oracle BLOB
    as bytea, the destination column is created
    using the bytea data type. If you want to use large object instead of bytea,
    just add the --blob_to_lo option to the ora2pg command. It will create the
    destination column as data type Oid and will save the BLOB as a large object
    using the lo_from_bytea() function. The Oid returned by the call to
    lo_from_bytea() is inserted in the destination column instead of a bytea.
    Because of the use of the function this option can only be used with actions
    SHOW_COLUMN, TABLE and INSERT. Action COPY is not allowed.
    If you want to use COPY or have huge size BLOB ( > 1GB) than can not be
    imported using lo_from_bytea() you can add option --lo_import to the
    ora2pg command. This will allow to import data in two passes:
    1. Export data using COPY or INSERT will set the Oid destination column
      for BLOB to value 0 and save the BLOB value into a dedicated file. It
      will also create a Shell script to import the BLOB files into the
      database using psql command \lo_import and to update the table Oid
      column to the returned large object Oid. The script is named
      lo_import-TABLENAME.sh
    2. Execute all scripts lo_import-TABLENAME.sh after setting the
      environment variables PGDATABASE and optionally PGHOST, PGPORT, PGUSER,
      etc. if they do not correspond to the default values for libpq.
      You might also execute manually a VACUUM FULL on the table to remove
      the bloat created by the table update.
      Limitation: the table must have a primary key, it is used to set the
      WHERE clause to update the Oid column after the large object import.
      Importing BLOB using this second method (--lo_import) is very slow so it
      should be reserved to rows where the BLOB > 1GB for all other rows use
      the option --blob_to_lo. To filter the rows you can use the WHERE
      configuration directive in ora2pg.conf.
  • Add command line option --cdc_ready to use current SCN per table when
    exporting data and register them into a file named TABLES_SCN.log This
    can be used for Change Data Capture (CDC) tools.
  • Allow to export only invalid objects when EXPORT_INVALID is set to 2
  • Disable per partition data export when a WHERE clause is define on the
    partitioned table or that a global WHERE clause is defined.

Backward compatibility:

Ora2Pg used to removr any timezone information from the TO_CHAR() format
function. To recover this behavior set TO_CHAR_NOTIMEZONE to 1 in ora2pg.conf

Complete list of changes:

  • Replace PERFORM by CALL when the stored procedure is a procedure. Thanks
    to Rui Pereira for the report.
  • Fix open cursor translation when using is in the query but not as keyword.
    Thanks to taptarap for the report.
  • Fix replacement of global variables in DECLARE section. Thanks to taptarap
    for the report.
  • Fix missing suffix in function name with autonomous transaction when export
    schema was enabled and fix revoke and owner to wrapper function. Thanks to
    Sergey Grinko for the report.
  • Fix export of type declaration in packages without body. Thanks to Sergey
    Grinko.
  • Fix column name duplicates when exporting data of partition. Thanks to
    Sergey Grinko for the report.
  • Fix BLOB export with INSERT mode, call decode() was missing.
  • Fix applying of DEFAULT_PARALLELISM_DEGREE hint that was not working
    anymore for a long time. Thanks to Marcel Pils for the patch.
  • Update documentation about PARALLEL_TABLES and view export. Thanks to
    xinferum for the report.
  • Fix unwanted quote escaping in global variable constant. Thanks to
    sergey grinko for the report.
  • Fix export of global variable when there is function in the default value.
  • Fix end of statements in last merged PR.
  • Add json output format to migration assessment. Thanks to Ted Yu for
    the patch.
  • Fix parsing of package when a comment follow the AS keyword. Thanks to
    Eric Delanoe for the report.
  • Adapt MAXVALUE for identity columns if the datatype has been changed to
    integer.
  • Fix a regression on data validation introduced with commit to fix data
    export of virtual column.
  • Fix Can't locate object method is_pk via package Ora2Pg error
  • Exclude unique keys using expression to validate data.
  • Fix ORDER BY clause for data validation.
  • Fix error on open pragma when encoding is not set.
  • Fix a regression in data export of virtual column. Thanks to Code-UV and
    IgorM12 for the report.
  • Fix a second regression with empty column name in target list to
    retrieve data.
  • Fix PG version to enable virtual column.
  • Fix binmode when it is set to raw or locale to not call encoding() in
    open pragma.
  • Fix regression in export view as table. Thanks to Sebastian Albert for
    the report.
  • Update Copyright year.
  • Quote tables names when necessary during TEST action.
  • Fix undefined call to auto_set_encoding().
  • Add test count of column per table and add output of the PG table struct
    modified to be used with MODIFY_STRUCT.
  • Fix handling of PRESERVE_CASE with update au sequences values
  • Fix handling of PRESERVE_CASE with TEST_DATA
  • Fix unwanted replacement of sysdate operation to epoch. Thanks to taptarap
    for the report.
  • Remove extra END clause at end of package function when a space or a
    comment was present. Thanks to taptarap for the report.
  • Fix missing import of module Encode. Thanks to Menelaos Perdikeas for
    the report.
  • Fix case where data type defined in function was not exported when
    EXPORT_SCHEMA was enabled. Thanks to Eric Bourlon for the report.
  • Fix missing EXECUTE on OPEN CURSOR statements. Thanks to taptarap for
    the report.
  • Fix missing declaration of min() function in Oracle.pm. Thanks to
    nicscanna for the report.
  • Fix SYSDATE subtract of seconds instead of days
  • Fix PERFORM replacement in CTE. Thanks to taptarap for the report.
  • Fix wrong stored procedure code conversion when use types named with
    "default" and broken decode to case translation. Thanks to taptarap
    for the report.
  • Add missing import of FTS indexes in script import_all.sh. Thanks to
    vijaynsheth for the report.
  • Fix another procedure parsing with return. Thanks to Eric Bourlon for
    the report.
  • Fix case where parenthesis are not added to index creation.
  • Add creation of the uuid extension when it is used.
  • Add HTML report of tables and columns with name > 63 characters.
  • Add report of DBMS_ERROR and Quartz Scheduler tables found.
  • Add mark (date?) on columns of DATE data type in Oracle to check if
    it should be translated into date instead of default timestamp.
  • SHOW_COLUMN: mark column data type with (numeric?) when it is a NUMBER
    without precision.
  • SHOW_TABLE+SHOW_COLUMN: Add mark of tables and columns name > 63
    characters
  • Fix translation of TYPE ... AS TABLE OF ...
  • Fix parsing of function call in check constraints. Thanks to Menelaos
    Perdikeas for the report.
  • Fix missing data export file for partitioned tables when TRUNCATE_TABLE
    was disabled. Thanks to Menelaos Perdikeas for the report.
  • Fix named parameter inserted in procedure call with inout parameters.
    Thanks to Rui Pereira for the...

Version 23.0

15 Nov 17:41
Compare
Choose a tag to compare

2021 11 15 - v23.0

This release fix several issues reported since past five months and
adds some new major features and improvements.

  • Add new option --blob_to_lo that can be used to export BLOB as large
    objects. It can only be used with action SHOW_COLUMN, TABLE and INSERT.
    When used with TABLE action, the BLOB column will be translated into oid
    PostgreSQL data type. When used with the INSERT export action BLOB data
    will be store as large object in the pg_largeobjects table and the oid
    referencing this large object will be stored in the main table instead
    of a bytea.
    It is not possible to use oid with COPY because this feature use function
    lo_from_bytea() that stores the large object in the external table and
    returns the oid.
    This feature works with or without the use of oracle_fdw to import the
    data and option -J can be used to improve the speed of the INSERT import
    provide that there is a numeric unique key on the table.
    Thanks to rodiq for the feature request.
  • Add command line option -W | --where clause to set the WHERE clauses to
    apply to the Oracle query to retrieve data. It can be used multiple time.
    It will override the WHERE configuration directive if there is a global
    WHERE clause or the same table WHERE clause definition. Otherwise the
    clause will be appended.
  • Add data validation feature consisting in comparing data retrieved from a
    foreign table pointing to the source Oracle table and a local PostgreSQL
    table resulting from the data export. By default Ora2Pg will extract 10000
    rows from both side, you can change this value using DATA_VALIDATION_ROWS.
    When it is set to zero all rows of the tables will be compared.
    Data validation requires that the table has a primary key or unique index
    and that the key columns is not a LOB.
    Due to differences in sort behavior between Oracle and PostgreSQL, if the
    collation of unique key columns in PostgreSQL is not 'C', the sort order of
    is different compared to Oracle. In this case the data validation will fail.
    Ora2Pg will stop comparing two tables after 10 errors, result is dumped to
    an output file named data_validation.log.
  • Add DATA_VALIDATION_ORDERING configuration directive enabled by default.
    Order of rows between both sides are different once the data have been
    modified. In this case data must be ordered using a primary key or a
    unique index, that mean that a table without such object can not be
    compared. If the validation is done just after data import in mode single
    process and without any data modification the validation can be done on all
    tables without any ordering.
  • Add DATA_VALIDATION_ERROR to stop validating data from a table after a
    certain amount of row mismatch. Default is to stop after 10 rows
    validation errors.
  • Allow multiprocess for TEST_DATA action to validate data import. Use -P
    or PARALLEL_TABLES to set the number of parallel tables checked. Output
    is now done to a file named data_validation.log saved in the current
    directory.
  • Add replacement of UTL_RAW.CAST_TO_RAW with encode().
  • Add rewrite of XMLTYPE() with xmlparse(DOCUMENT convert_from(..., 'utf-8')).
  • Add VARCHAR_TO_TEXT configuration directive. By default VARCHAR2 without
    size constraint are tranlated into text PG data type. If you want to use
    varchar instead, disable this directive.
  • Add detection of XML function for migration assessment cost.
  • Add DBMS_RANDOM to the list of Oraclism handled by Orafce.
  • Add support to mysql_fdw foreign data wrapper to export data
    PostgreSQL tables. Thanks to Yoni Sade for the feature request.
  • Allow to transform all NUMBER(,scale) to an other data type by a
    redefinition like NUMBER(
    ,2):decimal in the DATA_TYPE configuration
    directive. Thanks to Florent Jardin for the patch.
  • Add information on how to use SSL encrypted connection to documentation.
  • Add TEST_COUNT action to just report the row count diff between Oracle and PostgreSQL tables.

Backward compatibility changes:

  • Add FORCE_PLSQL_ENCODING configuration directive. In previous version Ora2Pg
    was encoding all functions code to ut8, this is no more the case because it
    could result in double encoding. To recover the old behavior (not recommanded)
    enable this directive. Thanks to rynerisraid and lee-jongbeom for the report.
  • Change behavior regarding RAW columns. Now RAW(16) and RAW(32) columns or
    RAW columns with "SYS_GUID()" as default value are now automatically
    translated into uuid. Data will be automatically migrated as PostgreSQL
    uuid data type provided by the "uuid-ossp" extension. To recover the old
    behavior to export data as bytea whatever is the precision, the following
    must be set with DATA_TYPE configuration: RAW(16):bytea,RAW(32):bytea

Here is the full list of changes and acknowledgements:

  - Fix USE_LOB_LOCATOR handling.
  - Fix data validation using oracle_fdw where zero after decimal is not strip
    unlike with PG.
  - Apply MODIFY_STRUCT redefinition to test actions
  - Fix PG filter when DATA_VALIDATION_ORDERING is disabled
  - Apply RAW to uuid transformation for data validation
  - Apply boolean transformation for data validation
  - Do not export data for virtual column for PG >= 13.
  - Fix wrong replacement function with name including a regexp_* function in
    his name. Thanks to Rui Pereira for the report.
  - Remove comments in the from clause before rewrite outer join (+), the entire
    FROM clause will be rewritten and we don't know where to restore.
  - Fix export of columns information for data verification.
  - Fix TEST_VIEW for row count returned by views to exclude views created in
    extensions.
  - Fix comment on procedures
  - Fix translation of MySQL type UNSIGNED
  - Fix test count of indexes for MySQL database.
  - Fix test MySQL sequence count.
  - Do not display error messages when user and db is first checked in the
    import_all.sh script
  - Fix ordering of check constraints
  - Fix mysql table scan when table name is using reserved word. Thanks to
    Stanley Sung for the report.
  - Fix double BOTH keyword in TRIM function. Thanks to Rui Pereira for the
    report.
  - Fix aliases placed in a wrong way. Thanks to Rui Pereira for the report.
  - Fix parsing of procedure broken on keyword RETURN. Thanks to Pavithra
    Jayasankar.
  - Fix case where default partition is taken as a value. Thanks to Karsten
    Lenz for the report.
  - Fix conversion of NUMBER without precision in PL/SQL code to respect
    settings PG_NUMERIC_TYPE, PG_INTEGER_TYPE and DEFAULT_NUMERIC. Fix
    translation of INTEGER/BINARY_INTEGER that was wrongly exported as
    numeric. Thanks to Philippe Beaudoin for the report.
  - Documentation fix. Thanks to mperdikeas for the patch.
  - Fix case where SQL%ROWCOUNT was not replaced by GET DIAGNOSTIC. Thanks to
    Awdotia Romanowna for the report.
  - Fix quote of unique constraints name. Thanks to Veka for the report.
  - Fix looking at package function metadata when there is a huge amount of
    package.
  - Fix error when trying to remove temporary files.
  - Fix wrong translation of a call to a procedure with PRAGMA AUTONOMOUS
    TRANSACTION through dblink. Thanks to Rui Pereira for the report.
  - Remove schema name in front of index name. Thanks to Menelaos Perdikeas
    for the report.
  - Fix virtual column generated from an other column of the table (supported
    in PG 12). Thanks to Veka for the report.
  - Fix case of columns names in boolean transformation when oracle_fdw is used
    to export data. Thanks to veka for the report.
  - Remove extra parenthesis with sub query and TABLE function. Thanks to Rui
    Pereira for the report.
  - Fix WHERE clause not removed in ROWNUM replacement. Thanks to Rui Pereira
    for the report.
  - Exclude extensions tables from table test count. Thanks to Yoni Sade for the
    report.
  - Fix pg_attribute column adsrc removed in PG 12. Thank to Thorsten Hochreuter
    for the patch.
  - Fix unwanted aliases after row_number() over(). Thanks to Rui Pereira for
    the report.
  - Fix several spelling issues. Thanks to Florian Eckert for the patch.
  - Fix wrong condition to import constraints in import_all.sh. Thanks to
    Thorsten Hochreuter for the report.
  - Fix BITMAP_AS_GIN detection. Thanks to Nishanth Bejgam for the patch.
  - Fix parsing of views from file and add PASSWORD, KEY and REF to the list
    of reserved keywords.
  - Fix replacement of CURSOR ... IS when there is comment after IS.
  - Fix comment in auto generated file global_variables.conf
  - Fix XML data export that was transformed by the call to function
    extract(/).getClobVal(), it is now replaced by a direct call to
    getClobVal().
  - Improve COPY FREEZE data export when FILE_PER_TABLE is enabled, the
    transactions are now managed per individual file and not following
    the main file. Thanks to Yoni Sade for the report.
  - Fix addition to UNLOGGED keyword on foreign table when exporting
    data using oracle_fdw. Thanks to Veka for the report.
  - Fix FK error when using TRUNCATE before data export with oracle_fdw.
  - Fix export of user defined type. Actually type definitions are extracted
    from ALL_SOURCE which contain the original CREATE TYPE and eventually
    all the ALTER TYPE commands. Previously those type as considered as not
    supported by Ora2Pg. 
  - replace date(n) by timestamp.
  - Always remove the fqdn SYS schema before functions call.
  - Add report of GTT in SHOW_TABLE action.
  - Fix empty partition values for Oracle 9i.
  - Add creation of schema in user defined type export when EXPORT_SCHEMA is
    enabled to fix an error when ...

Version 22.1

02 Jul 05:46
Compare
Choose a tag to compare

2021 07 02 - v22.1

This is a maintenance release to extend the feature of data export through the
oracle_fdw PostgreSQL extension to migration that use the public schema and
do not preserve case.

There is also some other fixes:

  • Fix compile_schema() call that breaks valid function based indexes by
    adding compile_all => FALSE to DBMS_UTILITY.compile_schema().
    Thanks to Pawel Fengler for the patch.
  • Force foreign table for data export as readonly to avoid accidental
    write if import schema is not cleaned.
  • Fix data export to file not possible since last changes for oracle_fdw
    export. Thanks to Niels Jespersen for the report.

Version 22.0

28 Jun 16:18
Compare
Choose a tag to compare

2021 06 26 - v22.0

This release fix several issues reported since past three months and
adds some new features and improvements. I must thanks MigOps Inc who
hire me to drive Oracle to PostgreSQL migrations and to develop Ora2Pg.
It's been a long time that I was looking for such a company and it is
an amazing gift for the 20 years of Ora2Pg. All improvements and new
new features developed during my work at MigOps will be available in
the public GitHub repository, here are the new ones.

  • Add export of data using oracle_fdw when FDW_SERVER is set and export
    type is COPY or INSERT. Multi-process using -P or -J is fully supported
    but option -j is useless in this case. Boolean transformation of some
    columns or data type is also supported. Actually, expect that it works
    just like data migration without oracle_fdw. This can improve the data
    migration speed from 30 to 40% especially for BLOB export.

  • Improve export performances with huge number of objects by avoiding join
    between Oracle catalog tables.

  • Set a maximum of assessment score for tables, indexes, sequences,
    partitions, global temporary table and synonym following the number of
    objects.

  • Add detection of XML functions to the assessment cost.

  • Allow to change the assessment cost unit value in the export_all.sh script
    when ora2pg is used with options --init_project and --cost_unit_value.

  • Remove pragma restrict_references from P/PSQL code, it is useless.

  • Add the oracle schema to search_path in SQL files generated and improve
    the migration assessment when USE_ORAFCE is enabled.

  • Apply ALLOW and EXCLUDED filtered stored procedures at package extraction
    level. Previous this patch there was no way to not export some package
    functions or to exclude them from assessment.

  • Add new tests to check sequences last values and number of identity columns
    in both side.

  • Apply ALLOW/EXCLUDE without object to table object by default in TEST
    action.

New configuration directives:

  • Add ORACLE_FDW_TRANSFORM configuration directive to apply a transformation
    to a column when exporting data. Value must be a semicolon separated list of
    TABLE[COLUMN_NAME, &gt;replace code in SELECT target list&lt;]
    For example to replace string 'Oracle' by 'PostgreSQL' in a varchar2 column
    use the following.
    ERROR_LOG[DBMS_TYPE:regexp_replace("DBMS_TYPE",'Oracle','PostgreSQL')]

  • Add DROP_IF_EXISTS configuration directive to add a statement
    "DROP >OBJECT< IF EXISTS" before creating the object. Can be
    useful in an iterative work. Default is disabled.

Backward compatibility:

There is a backward compatibility issue with old configuration files
where FDW_SERVER is set by default. This directive was not used when
exporting data, this is not the case anymore as it instruct Ora2Pg to
use the given foreign server to use oracle_fdw to migrate the data.

Note that Ora2Pg 22.0 needs that PRESERVE_CASE and EXPORT_SCHEMA be enabled to be able to use data export through oracle_fdw. Short coming release 22.1 will allow the use of oracle_fdw without preserving case and schema export.

Here is the full list of changes and acknowledgements:

  - Fix replacement of TO_CLOB() function, now it is just removed and the
    parenthesis are kept. Thanks to Rui Pereira for the report.
  - Fix incorrect detection of cursor on dynamic query. Thanks to Rui
    Pereira for the report.
  - Fix quoting column names with spaces and dots. Dots are replaced by
    underscore. Thanks to Veka for the report.
  - Fix one case where DEFINED_PKEY with PRESERVE_CASE was not handled
    correctly. Thanks to Veka for the report.
  - Fix quoting of reserved keywords in CREATE INDEX columns names. Thanks
    to Veka for the report.
  - Fix column name starting with number not quoted in COMMENT. Thanks to
    Veka for the report.
  - Fix addition of PERFORM on call to stored procedures not prefixed by
    the package name. Thanks to Rui Pereira fo the report.
  - Fix search of ora2pg_conf.dist under Windows instead of ora2pg.conf.dist
    when --init_project is used. Thanks to Julien Monticolo for the report.
  - Fix translation from file of check constraint when created on same column,
    only the last one was exported. Also shortened the prefix for constraint
    naming, ora2pg_ckey becomes o2pc, ora2pg_ukey is now o2pu and ora2pg_fkey
    is renamed into o2pf. Thanks to anvithaprabhu8 for the report.
  - Replace wildcard precision * for numeric by 38.
  - Fix incomplete listagg() conversion. Thanks to avandras for the report.
  - Fix potential problem in last_day conversion when USE_ORAFCE is off and
    a number is added or subtracted to the last day. Thanks to atlterry for
    the report.
  - Add DROP_IF_EXISTS configuration directive. Thanks to dherzhau for the feature request.
  - Do not apply utf8 conversion of comments to input files.
  - Fix termination of last writer process when parallel and quiet mode are
    used together. Thanks to David Harper for the patch.
  - Remove precision in number of digit in timestamp microseconds when
    setting NLS_TIMESTAMP_FORMAT at session startup. Now use:
      ALTER SESSION SET NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24:MI:SS.FF'
    instead of '.FF6'. This was possibly the cause of sporadic error:
      ORA-03106: fatal two-task communication protocol error (DBD ERROR: OCIStmtFetch)
    Default is precision 6 so it may not change anything. Thanks to
    Abhijeet Bonde for the report.
  - Fix call to deprecated MySQL spatial function when version is after 5.7.6.
    Thanks to naveenjul29 for the report.
  - Fix false positive detection for nested table with MySQL export.
  - Fix sequence export read from file.
  - Add PG_VERSION to the documentation. Thanks to xinjirufen for the report.
  - Fix error report when preparing query to ALL_IND_COLUMNS IC. Thanks to
    ganeshakorde for the report.
  - ora2pg_scanner: Fix detection of service_name in DSN.
  - Fix error raise_application_error() with named parameters.
  - Fix replacement of out parameters in triggers.
  - Change sequence export result storage to hash instead of array.
  - Fix package export when there is a comment between PACKAGE BODY and the
    name of the package.
  - Fix Perl error "malformed utf-8 character in substitution" when there is
    character not in utf8 in the comment or constants.
  - Fix detection of MySQL FUNCTION vs PROCEDURE for version >= 5.5. Thanks
    to naveenjul29 for the report.
  - Exclude nested tables from the export as it is not supported and it
    always generate an error. A warning is raised.
  - Fix column case in check constraints when PRESERVE_CASE is enabled.
  - Fix search_path in direct PG data export when PG_SCHEMA is set.
  - Fix -Infinity insert for direct PG data export.
  - Fix drop indexes when PRESERVE_CASE is enabled.
  - Remove potential double affectation for function with out parameter.
  - Create immutable to_char function when used in an index.
  - Replace dmake by gmake on Windows installation instruction. Thanks to
    Julien Monticolo for the report.
  - Fix MySQL version conditions. Thanks to Christoph Berg for the report.
  - Fix HASH partitioning for duplicate WITH clause.
  - Fix tests when no schema are set to compare all objects in all schemes.
    Thanks to gp4git and dlc75 for the report.
  - Apply ALLOW/EXCLUDE without object to table object by default in TEST
    action. Thanks to Yony Sade for the feature request.
  - Add DROP_IF_EXISTS configuration directive. Thanks to dherzhau for the
    feature request.
  - Fix regression in removing %ROWTYPE from function parameters. Thanks to
    Eric Delanoe for the report.
  - Fix not adding default values to parameters when this is an OUT parameter.
    Thanks to Eric Delanoe for the report.
  - Fix ALL_DIRECTORIES call be using table name relative to USER_GRANTS.
    Thanks to Yoni Sade for the report.
  - Change all remaining call to static ALL_* tables to a call relative to
    USER_GRANTS. Thanks to Yoni Sade for the report.
  - Fix export or partitioned table with unsupported partitioning type
    like PARTITION BY REFERENCE. The table is created without partition
    and a warning it fired as well as the following message in the output
    file as a comment: "-- Unsupported partition type, please check"

Version 21.1

01 Apr 20:39
Compare
Choose a tag to compare

2021 04 01 - v21.1

This release fix several issues reported since past six months and adds some new features and improvements.

  • Now that Orafce 3.15.0 has a definition for the REGEXP_* function, makes the translation optional to USE_ORAFCE directive.
  • Add set application name in connection to Oracle/MySql/PostgreSQL.
  • Add translation of REGEXP_COUNT() and change assessment cost.
  • Rewrite the way REGEXP_LIKE() is translated into regexp_match to support modifiers. This rewrite also fix default behavior between
    Oracle and PostgreSQL.
  • Replace DBMS_LOB.GETLENGTH() by PostgreSQL octet_length() function.
  • Add types correspondences for VARCHAR2 and NVARCHAR2 in DATA_TYPE configuration directive.
  • Add autodetection and support of geometry type, srid and dimension for ArcGis geometries.
  • Add conversion of default value in function parameters.
  • Add -u | --unit option to ora2pg_scanner to be able to set the migration cost unit value globally.
  • Replace DBMS_LOB.SUBSTR() by SUBSTR()
  • Remove TO_CLOB() it is useless, manual cast could be necessary.
  • Replace IS JSON validation clause in CHECK constraints by (CASE WHEN $1::json IS NULL THEN true ELSE true END). When the code is invalid an error is fired.
  • DISTINCT and UNIQUE are synonym on Oracle.

Backward compatibility changes:

  • Force a column to be bigint if this is an identity column. Thanks to MigOps.com for the patch.
  • Fix EMPTY_LOB_NULL, enable/disable was inverted, keeping default to enabled. Take care that in old ora2pg.conf it is disabled so it
    will break backward compatibility with old configuration.
  • Replace NO_LOB_LOCATOR with USE_LOB_LOCATOR and NO_BLOB_EXPORT with ENABLE_BLOB_EXPORT to avoid confusion with double negative variable. Backward compatibility is preserved with a warning.
  • SRID for SDO_GEOMETRY export is now taken from the value not forced from the metadata table.

Here is the full list of changes and acknowledgements:

  - Take Geometry SRID from the data and fallback to SRID defined in
    metadata when not found. Thanks to Sebastian Albert for the report.
  - Fix case where Ora2Pg temporary substitution of '' by placeholder
    was not restored. Thanks to MigOps.com for the patch.
  - Fix identity column export on unsupported Oracle 18c options.
    Thanks to MigOps.com for the patch.
  - Fix export of columns indexes created with single quote.
    Thanks to MigOps.com for the patch.
  - Fix replacement of keyword PROCEDURE by FUNCTION in constraints
    constants definition. Thanks to marie-joechahine for the report.
  - Replace IS JSON validation clause in CHECK constraints. Thanks to
    marie-joechahine for the report and MigOps.com for the patch.
  - Add support to ON OVERFLOW clause in LISTAGG replacement.
    Thanks to MigOps.com for the patch.
  - Fix incorrect handling of HAVING+GROUP BY rewriting.
    Thanks to MigOps.com for the patch.
  - Add replacement of TO_NCHAR by a cast to varchar. Thanks to
    MigOps.com for the patch.
  - Fix replacement of NOTFOUND when there is extra space or new line
    in the WHEN EXIT clause. Thanks to MigOps.com for the patch.
  - Fix a regression in NO_VIEW_ORDERING, it was not taken in account
    anymore. Thanks to RonJojn2 for the report.
  - Replace DATA_TYPE with DTD_IDENTIFIER in MySQL catalog queries for
    version prior 5.5.0. Thanks to zejeanmi for the report.
  - Fix import script to import sequences before tables. Thanks to
    MigOps.com for the patch.
  - Fix detail report of custom type in migration assessment. Thanks
    to MigOps.com for the patch.
  - Fix duplicate schema prefixed to SYNONYM. Thanks to dlc75 for the
    reports.
  - Replace NO_LOB_LOCATOR with USE_LOB_LOCATOR and NO_BLOB_EXPORT with
    ENABLE_BLOB_EXPORT to avoid confusion with double negative variable.
    Thanks to Rob Johnson for the report.
  - Fix some missing replacements of NVL and rewrite !=-1 into != -1.
    Thanks to MigOps.com for the patch.
  - Fix ROWNUM followed by + or - operator and when no aliases are
    provided. Thanks to MigOps.com for the patch.
  - Add DBSFWUSER to the list of user/schema exclusion. Thanks to
    MigOps.com for the patch.
  - Fix regexp to not append subquery aliases on JOIN clause. Thanks
    to Rui Pereira for the report.
  - Handle PRESERVE_CASE and EXPORT_SCHEMA in sequence name. Thanks
    to marie-joechahine for the report.
  - Add CREATE SCHEMA statement to sequence export when EXPORT_SCHEMA
    is enabled. Thanks to marie-joechahine for the report.
  - Fix duplicate index name on subpartition. Thanks to Philippe
    Beaudoin for the report.
  - Exclude sequences used for IDENTITY column (ISEQ$$_). Thanks to
    marie-joechahine for the report.
  - Fix parsing from file of CREATE SEQUENCE. Thanks to Rui Pereira
    for the report.
  - In export_all.sh script use the database owner provided if it is a
    superuser instead of postgres user. Thanks to jjune235 for the
    feature request.
  - Fix parsing of triggers when there is a CASE inside the code.
    Thanks to Rui Pereira for the report.
  - Add set application name in connection to Oracle/MySql/PostgreSQL.
    Thanks to Yoni Sade for the patch.
  - Fix double column alias when replacing ROWNUM. Thanks to Rui
    Pereira for the report.
  - Add translation of the REGEXP_COUNT function and change assessment
    cost.
  - Rewrite the way REGEXP_LIKE is translated into regexp_match to
    support modifiers. This rewrite also fix default behavior between
    Oracle and PostgreSQL.  Thanks to otterrisk for the report.
  - Add IS JSON to assessment. Thanks to marie-joe Chahine for the
    report.
  - Fix multi-columns RANGE partitioning. Thanks to Philippe Beaudoin
    for the report.
  - Improve reordering columns. Sort by fieldsize first, if same size
    then it sorts by original position. Thanks to Sebastien Caunes for
    the patch.
  - Append partition's column to the primary key of the table as it
    must be part of the PK on PostgreSQL. Thanks to xinjirufen for the
    report.
  - Fix partition export where PRESERVE_CASE was applied to Oracle
    side. Thanks to schleb1309 for the report.
  - Fix trigger export with column restriction. Thanks to Sebastien
    Caunes for the report.
  - Update installation information.
  - Fix table reordering following data type. Thanks to Sebastien
    Caunes for the patch.
  - Fix incorrect variable name corresponding to DATA_EXPORT_ORDER
    making this directive inefficient. Thanks to Ron Johnson for the
    report.
  - Fix translation of check constraint when read from file
  - Fix EMPTY_LOB_NULL, enable/disable as inverted, keep default to
    enabled. Take care that in old ora2pg.conf it is disabled so it
    will break backward compatibility with old configuration.
  - Fix false positive detection of input filename is the same as
    output file.
  - Rename variables SCHEMA_ONLY, DATA_ONLY and CONSTRAINTS_ONLY in
    script import_all.sh to conform to their real use. Thanks to
    Sebastien Caunes for the report.
  - Fix comment detection breaking the package header parsing and
    global variable detection.
  - Fix ROWNUM detection for replacement by LIMIT
  - Fix escaping of psql command in configuration file comment and
    set default value for PG_VERSION to 12.
  - Replace precision by exactness in documentation. Thanks to
    Sebastien Caunes for the report.
  - Prevent reducing DATA_LIMIT when NO_BLOB_EXPORT is enabled.
   Thanks to Thomas Reiss for the report.
  - Fix geometry type detection.
  - Add autodetection of geometry type, srid and dimension for
    ArcGis geometries. Thanks to changmao01 for the feature request.
  - Fix call to ST_GeomFromText when no SRID is found.
  - Fix case where OVERRIDE SYSTEM VALUE clause could be added if PG
    version is < 10. Thanks to changmao01 for the report.
  - Fix unwanted call to internal GEOM library for ArcGis geometries.
    Thanks to changmao01 for the report.
  - Exclude schema SDE (ArGis) from export. Thanks to changmao01 for
    the report.
  - prevent looking twice to same custom data type definition.
  - Fix previous patch to catch SDO_GEOMETRY on lowercase regexp.
  - Limit detection of geometry data type to SDO_GEOMETRY.
  - Fix column name replacement in view definition. Thanks to Amit
    Sanghvi for the report.
  - Fix REPLACE_COLS parsing to allow space in column name. Thanks
    to Amit Sanghvi for the report.
  - Fix translation from file of triggers with WHEN clause. Thanks
    to Rui Pereira for the report.
  - Fix column name kept lowercase in the MOD() clause when -J is
    used. Thanks to Code-UV for the report.
  - Keep case of PG_SCHEMA definition when used in TEST action.
  - Fix data export for columns with custom data type. Thanks to
    Aymen Zaiter for the report.
  - Fix missing bracket with || operator in CREATE INDEX. Thanks to
    traxverlis for the report.
  - Fix export of single row unique function base index. Example:
      CREATE UNIQUE INDEX single_row_idx ON single_row ((1));
    Thanks to unrandom123 for the report.
  - Update documentation about schemas used in TEST action.
  - Disable materialized view export with MySQL export it is not
    supported. Thanks to naveenjul29 for the report.
  - Fix table alias detection in Oracle (+) join rewrite.
  - Fix an infinite loop in Oracle (+) join rewrite when there is no
    table aliases and the table is prefixed by its schema. Thanks to
    Olivier Picavet for the report.
  - Fix MODIFY_STRUCT when column name need to be escaped. Thanks to
    helmichamsi10 for the report.
  - Fix empty PARTITION BY () clause. Thanks to Aymen Zaiter.
  - Fix export of global variable from package description when there
    is no package body. Thanks to naveenjul29 for the report.
  - Add package descriptio...

Version 21.0

12 Oct 17:01
Compare
Choose a tag to compare

2020 10 12 - v21.0

This release fix several issues reported since last release and adds
several new features and improvements.

New features, options and configuration directives in this release:

  • Add clause OVERRIDING SYSTEM VALUE to INSERT statements when the
    table has an IDENTITY column.
  • Considerably increase the speed to generate the report about the
    migration assessment, especially for database with huge number of
    objects.
  • Reduce time passed in the progress bar. Following the number of
    database objects we were spending too much time in refreshing the
    progress bar.
  • Add number of identity columns in migration assessment report.
  • Make assessment details report initially hidden using HTML5 tags
    details+summary.
  • Improve speed of BLOB/CLOB data export. Oracle recommends reading
    from and writing to a LOB in batches using a multiple of the LOB
    chunk size. This chunk size defaults to 8k (8192). Recent tests
    show that the best performances can be reach with higher value
    like 512K or 4Mb.
  • Add progress bar when --oracle_speed is use in single process mode.
  • Automatically activate USER_GRANTS when the connection user has no DBA
    privilege. A warning is displayed.
  • Complete port to Windows by using the Windows separator on stdout
    redirection into a file at ora2pg command line call and improve
    ora2pg_scanner port on Windows OS.
  • Add rewrite of MySQL JOIN with WHERE clause instead of ON.
  • Add MGDSYS (Oracle E-Business Suite) and APEX_040000 to the list
    of schemas excluded from the export.
  • Supply credentials interactively when a password is not defined in
    the configuration file. Need the installation of a new Perl module
    Term::ReadKey.
  • Add supports oracle connections "as sysdba" with username "/" and
    an empty password to connect to a local oracle instance.
  • Add translation of PRIVATE TEMPORARY TABLE from Oracle 18c into
    PostgreSQL basic temporary table, only the default behavior for
    on commit change.

New command line options:

  • Add new command line option to ora2pg_scanner: -b | --binpath DIR
    to set the full path to directory where the ora2pg binary stays.
    Might be useful only on Windows OS.
  • Add -r | --relative command line option and PSQL_RELATIVE_PATH
    configuration directive. By default Ora2Pg use \i psql command to
    execute generated SQL files if you want to use a relative path
    following the script execution file enabling this option will use
    \ir. See psql help for more information.

New configuration directives:

  • NO_VIEW_ORDERING:
    By default Ora2Pg try to order views to avoid error at import time
    with nested views. With a huge number of views this can take a very
    long time, you can bypass this ordering by enabling this directive.
  • NO_FUNCTION_METADATA
    Force Ora2Pg to not look for function declaration. Note that this
    will prevent Ora2Pg to rewrite function replacement call if needed.
    Do not enable it unless looking forward at function breaks other
    export.
  • LOB_CHUNK_SIZE
    See explanation in the new features and improvement list.
  • ALTERNATIVE_QUOTING_REGEXP
    To support the Alternative Quoting Mechanism ('Q' or 'q') for String
    Literals set the regexp with the text capture to use to extract the
    text part. For example with a variable declared as
    c_sample VARCHAR2(100 CHAR) := q'{This doesn't work.}';
    the regexp to use must be:
    ALTERNATIVE_QUOTING_REGEXP q'{(.*)}'
    ora2pg will use the $$ delimiter, with the example the result will
    be:
    c_sample varchar(100) := $$This doesn't work.$$;
    The value of this configuration directive can be a list of regexp
    separated by a semi colon. The capture part (between parenthesis) is
    mandatory in each regexp if you want to restore the string constant.

Backward compatibility changes:

  • Default for NO_LOB_LOCATOR is now 1 to benefit from the LOB_CHUNK_SIZE
    performances gain.
  • Enable schema compilation (COMPILE_SCHEMA set to 1) by default to
    speed up DDL extraction.
  • Change the behavior of Ora2Pg with the parameters that follows a
    parameter with a default value. Ora2Pg used to change the order of the
    parameter's function to put all parameters with a default value at end
    of the list which need a function call rewrite. This have been abandoned
    now any parameter without default value after a parameter with a default
    value will be appended DEFAULT NULL.

Here is the full list of changes and acknowledgements:

  - Fix unwanted references to PK/UK when DROP_INDEXES is enabled.
  - Fix comparison between function name in TEST report.
  - Fix duplicates on retrieving partitions information.
  - Improve SHOW_TABLE report about partitioned tables information.
  - Drop code about removing DEFAULT NULL in functions parameters. Thanks to
    chaluvadi286 for the report.
  - Fix two other case where materialized view can be listed in the table list.
  - Fix case where materialized view can be listed in the table list. Thanks
    to Thomas Reiss for the report.
  - Fix %ROWTYPE removing to be restricted to REF CURSOR. Thanks to
    jagmohankaintura-tl for the report.
  - Fix PG functions count when comparing Oracle functions count in TEST action.
    Remove useless -l option to import_all.sh auto generated script.
  - Fix PRESERVE_CASE on schema name for functions extracted from a package.
  - Fix search_path adding public default schema.
  - Apply PRESERVE_CASE to partition by involved columns.
  - Add IF EXIXTS to create schema to avoid error when import_all.sh is run
    several time.
  - Fix sort order of comment on columns for tables and views.
  - Fix warning about data export from nonexistent table resulting of index
    lookup on nested table.
  - Fix infinite loop in global variables package extraction. Thanks to Thomas
    Reiss for the report.
  - Fix global variables and packages export when comments are present in the
    package description.
  - Add information about XML_PRETTY size limit to 4000
  - Fix column name in indexes when PRESERVE_CASE is enabled. Thanks 
    to Julien traxverlis for the report.
  - Fix Top 10 of largest tables sort order. Thanks to Tom Vanzieleghem
    for the patch.
  - Fix duplicates between indexes and constraints. Thanks to sdpdb and
    Jon Betts for the report.
  - Fix SYSDATE replacement and possible infinite loop in SYSDATE parsing.
    Thanks to pbidault for the report.
  - Fix export of Oracle TEXT indexes with USE_UNACCENT disabled. Thanks to
    Eric Delanoe for the report.
  - Add new configuration directive ALTERNATIVE_QUOTING_REGEXP to support
    the Alternative Quoting Mechanism ('Q' or 'q') for String Literals.
    Thanks to just-doit for the report.
  - Fix OF clause missing in update triggers. Thanks to just-doit for
    the report.
  - Fix IS NULL translation in WHERE clause of UPDATE statement. Thanks
    to Eric Delanoe for the report.
  - Remove DDL export of LOG indexes on materialized views.
  - Fix unexpected materialized view listed in table export. Thanks to
    jagmohankaintura-tl for the report.
  - Fix default values with single quote in create table DDL. Thanks to
    justdoit for the report.
  - Fix double quote in CREATE TRIGGER code and applying of preserve case
    on column name.
  - Supply credentials interactively when a password is not defined in
    configuration file. Thanks to rpeiremans for the patch.
  - Add supports oracle connections "as sysdba" with username "/" and
    an empty password to connect to a local oracle instance. Thanks to
    rpeiremans for the patch.
  - Fix documentation about materialized view export.
  - Fix export order of comments on columns.
  - Fix export of views comments when no schema is used for export and
    export schema is activated.
  - Fix cast in replacement with TO_NUMBER and TO_CHAR in indexes. Thanks
    to Kiran for the report.
  - Add MGDSYS (Oracle E-Business Suite) to the list of schemas excluded
    from the export. Thanks to naveenjul29 for the report.
  - Add more information about PG_DSN use. Thanks to Pepan7 for the report.
  - Update copyright year.
  - Fix regression where "SET client_encoding TO ..." was missing data file
    header. Thanks to Emmanuel Gaultier for the report.
  - Fix EDITABLE vs EDITIONABLE parsing. Thanks to Naveen Kumar for the report.
  - Fix typos in documentation. Thanks to swallow-life, ChrisYuan, Edward Betts,
    Jack Caperon and cavpollo for the patches.
  - Add OVERRIDING SYSTEM VALUE to INSERT statement when the table has an
    IDENTITY column. Thanks to Robin Windey for the report
  - Remove empty parenthesis of identity column options
  - Limit sequence/identity column value to bigint max
  - Add an example of DBD::Oracle DSN with 18c.
  - Fix parsing of identity column from file. Thanks to deepakp555 for the
    report.
  - Fix quoting of identifier when PRESERVE_CASE is enable and no particular
    schema is specified. Thanks to mkgrgis for the report.
  - Move setting of search_path before truncate table. Thanks to Michael Vitale
    for the report.
  - Add explanation about TEST and SIZE migration assessment values.
  - Mark XMLTYPE as having LOB locator.
  - Fix XMLTYPE columns that are exported as lob locator. Thanks to Tamas for
    the report.
  - Fix a problem of data export throughput that was slowing down all along
    the export when multiprocess for output was not used. Ora2Pg was forking
    a process for each chunk of data (see DATA_LIMIT) which is useless when
    write output is done on a single process (-j 1) and slow down the export.
    Thanks to markhooper99 and Tamas for reporting,...

Version 20.0

18 Jan 09:38
Compare
Choose a tag to compare

2019 01 18 - v20.0

This release fix several issues reported during the last three months
and adds several new features and improvement. The change of major
version is related to backward compatibility break with the removed of
most PG_SUPPORTS_* configuration directives and their replacement with
the new PG_VERSION directive.

The release adds some new features and configuration directives:

  * Add PG_VERSION configuration directive to set the PostgreSQL major
    version number of the target database. Ex: 9.6 or 10. Default is
    current major version at time of a new release. This replace the
    old PG_SUPPORTS_* configuration directives.
  * Removed all PG_SUPPORTS_* configuration directives minus
    PG_SUPPORTS_SUBSTR that is related to Redshift engine.
  * Export of BFILE as bytea is now done through a PL/SQL function to
    extract the content of a BFILE and generate a bytea data suitable
    for insert or copy into PostgreSQL.
  * Foreign keys that reference a partitioned table are no more
    exported.
  * Show table name on Oracle side during export using at connection
    time: DBMS_APPLICATION_INFO.SET_ACTION(table_name);
  * When the date format is ISO and the value is a constant the call
    to to_date() is removed and only the constant is preserved. For
    example: to_date(' 2013-04-01 00:00:00','SYYYY-MM-DD HH24:MI:SS')
    is replaced by a simple call to: ' 2013-04-01 00:00:00'.
    This rewrite is limited to PARTITION export type when directive
    PG_SUPPORTS_PARTITION is enabled.
  * Add DATA_EXPORT_ORDER configuration directive. By default data
    export order will be done by sorting on table name. If you have
    huge tables at end of alphabetic order and are using multiprocess,
    it can be better to set the sort order on size so that multiple
    small tables can be processed before the largest tables finish.
    In this case set this directive to size. Possible values are name
    and size. Note that export type SHOW_TABLE and SHOW_COLUMN will
    use this sort order too, not only COPY or INSERT export type.
  * Add NO_BLOB_EXPORT configuration directive. Exporting BLOB could
    take time and you may want to export all data except the BLOB
    columns. In this case enable this directive and the BLOB columns
    will not be included into data export. The BLOB column must not
    have a NOT NULL constraint. Thanks to Ilya Vladimirovich for the
  * Add PREFIX_SUB_PARTITION to enable/disable sub-partitioning table
    prefixing in case of the partition names are a part of the sub-
    partition names.
  * Add special replacement for case of epoch syntax in Oracle:
        (sysdate - to_date('01-Jan-1970', 'dd-Mon-yyyy'))*24*60*60
    is replaced by the PostgreSQL equivalent:
        (extract(epoch from now()))

Here is the full list of changes and acknowledgements:

  - Export indexes and constraints on partitioned table with pg >= 11.
  - Fix incorrect replacement of NLS_SORT in indexes.
  - Bring back DISABLE_UNLOGGED feature. Thanks to Jean-Christophe
    Arnu for the patch
  - Fix CREATE SCHEMA statement that was not written to dump file.
  - Fix DBMS_APPLICATION_INFO.set_action() call, old Oracle version
    do not support named parameters.
  - Fix duplicate index name on partition. Thanks to buragaddapavan
    for the report.
  - Add support to new configuration directive PG_VERSION to control
    the behavior of Ora2Pg following PostgreSQL version.
  - Fix error in creation of default partition with PostgreSQL 10.
    Thanks to buragaddapavan for the report.
  - Fix missing export of single MAXVALUE partition, this will produce
    the following range partition: ... FOR VALUES FROM (MINVALUE) TO
    (MAXVALUE) Previous behavior was to not export partition as it is
    better to not partition the table at all. However it is declared
    in Oracle so it is better to export it to see what can be done.
    Thanks to buragaddapavan for the report.
  - Do not export foreign keys that reference a partitioned table.
    Remove NOT VALID on foreign keys defined on a partitioned
    table if present. Thanks to Denis Oleynikov for the report.
  - Fix export of BFILE as bytea. Ora2Pg now use a PL/SQL function to
    extract the content of a BFILE and generate a bytea data suitable
    for insert or copy into PostgreSQL. Thanks to RickyTR for the
    report.
  - Add TIMEZONE_REGION and TIMEZONE_ABBR to migration assessment, no
    direct equivalent in PostgreSQL. Remove NSLSORT not used in
    migration assessment. Thanks to buragaddapavan for the report.
  - Fix output of multiple export type specifed in TYPE directive.
  - Rewrite and renaming of _get_sql_data() function into
    _get_sql_statements().
  - Limit CURSOR weight in migration assessment to REF CURSOR only,
    other case are all covered. REF CURSOR might need a review to see
    if they need to be replaced with a SET OF RECORD.
  - Fix replacement of EMPTY_CLOB() or EMPTY_BLOB() with empty string
    when EMPTY_LOB_NULL is disabled and NULL when it is enabled.
  - Prefix output file with the export type in multiple export type
    mode, ex: sequence_output.sql or table_output.sql. Thanks to
    buragaddapavan for the report.
  - Fix export of data from an Oracle nested table. Thanks to rejo
    oommen for the report.
  - Removed cast to timestamp from partition range. Thanks to
    buragaddapavan and rejo-oommen for the report.
  - Fix partition default syntax. Thanks to rejo-oommen for the
    report.
  - Apply missing SYSUSERS schemas exclusion on columns and partition
    listing. Thanks to rejo-oommen for the report.
  - Add warning about parameter order change in output file.
  - Show table name on Oracle side during export using at connection
    time: DBMS_APPLICATION_INFO.SET_ACTION(table_name);
    Thanks to Denis Oleynikov for the feature request.
  - Report change in ORA_RESERVED_WORDS into documentation.
  - Add references in the keyword list of ORA_RESERVED_WORDS.
  - Fix the missing white space in some lines while creating
    import_all.sh file. Thanks to Fabiano for the patch.
  - Fix translation of infinity value for float. Thanks to Damien
    Trecu for the report.
  - Fix default value in timestamp column definition when a timezone
    is given. Thanks to buragaddapavan for the report.
  - Fix missing export of index and constraint in a partitioned
    table when DISABLE_PARTITION is enabled. Thanks to Denis Oleynikov
    for the report.
  - Prevent PARTITION BY when DISABLE_PARTITION is enabled. Thanks to
    Denis Oleynikov for the report.
  - Add DATA_EXPORT_ORDER configuration directive. By default data
    export order will be done by sorting on table name. If you have
    huge tables at end of alphabetic order and are using multiprocess,
    it can be better to set the sort order on size so that multiple
    small tables can be processed before the largest tables finish.
    In this case set this directive to size. Possible values are name
    and size. Note that export type SHOW_TABLE and SHOW_COLUMN will
    use this sort order too, not only COPY or INSERT export type.
    Thanks to Guy Browne for the feature request.
  - Fix remove leading ':' on Oracle variable taking care of regex
    character class. Thanks to jselbach for the report.
  - Add NO_BLOB_EXPORT configuration directive. Exporting BLOB could
    take time and you may want to export all data except the BLOB
    columns. In this case enable this directive and the BLOB columns
    will not be included into data export. The BLOB column must not
    have a NOT NULL constraint. Thanks to Ilya Vladimirovich for the
    feature request.
  - Fix incorrect rewrote of the first custom type in a row. Thanks
    to Francesco Loreti for the patch.
  - Remove double quote in type definition en set type name in lower
    case when PRESERVE_CASE is disabled.
  - Add PREFIX_SUB_PARTITION to enable/disable sub-partitioning table
    prefixing in case of the partition names are a part of the sub-
    partition names.
  - Fix epoch replacement case in CREATE TABLE statements.
  - Apply epoch replacement to default value in table declaration.
  - Add special replacement for case of epoch syntax in Oracle:
        (sysdate - to_date('01-Jan-1970', 'dd-Mon-yyyy'))*24*60*60
    is replaced by the PostgreSQL equivalent:
        (extract(epoch from now()))
    Thanks to rejo-oommen for the feature request.
  - A few typos in --help sections. Thanks to Christophe Courtois
    for the report.
  - Fix export of primary key on partition table. Thanks to chmanu
    for the patch.
  - Fix malformed user defined type export. Thanks to Francesco Loreti
    for the report.