@laurenz laurenz released this Oct 1, 2018 · 2 commits to master since this release

Assets 11

Enhancements:

  • Add support for the "json" PostgreSQL data type. On the Oracle side, CLOB or VARCHAR2 can be used.
    Suggested by @bsislow.

  • Add support and documentation for building with Microsoft Visual Studio.
    Patch by @chrullrich.

  • Enable delayed loading of the Oracle DLL on Windows. This allows better diagnostic messages if the library cannot be loaded.
    Patch by @chrullrich.

  • Report the correct SQLSTATE for constraint violation and deadlock errors.
    Idea by "omistler".

  • Push down outer joins to Oracle.
    Patch by @yamatattsu, courtesy of NTT OSS Center.

Bugfixes:

  • Missing check if Oracle data types can be converted to PostgreSQL types.
    This bug was introduced in 2.0.0.

  • When oracle_fdw is loaded, initializing background workers (e.g. for parallel query) failed with:

    ERROR:  invalid cache ID: 41
    
  • Don't try to push down IS [NOT] DISTINCT FROM expressions. Oracle does not support this standard SQL syntax.

  • Don't push down IS [NOT] NULL tests on boolean expressions. This caused

    ORA-00907: missing right parenthesis
    

    Noticed by @yamatattsu during testing with sqlsmith.

  • Allow foreign tables to be defined on Oracle queries that contain double quotes. This caused an error message due to a sanity check that has become obsolete when this feature was introduced.
    Noted by @Bpapman.

  • Disable push-down of foreign joins in queries with FOR UPDATE.
    These used to be pushed down before, but without the FOR UPDATE clause, leading to incorrect behavior in the face of concurrency.
    Noted and fixed by @yamatattsu.

@laurenz laurenz released this Sep 15, 2017 · 95 commits to master since this release

Assets 16

Incompatible changes:

  • Remove the deprecated option plan_costs, since it is not very useful and is a maintenance burden.
    After an upgrade, tables with this option set should be updated with:

    ALTER FOREIGN TABLE ... OPTIONS (DROP plan_costs);
    

Enhancements:

  • Push down 2-way inner joins in SELECT statements if all conditions can be pushed down.
    Patch by Tatsuro Yamada (@yamatattsu), courtesy of NTT OSS Center.

Bugfixes:

  • oracle_fdw crashed on Windows if queries use a NULL parameter or an empty subselect.
    Report by PAscal Lemoy (@legrandlegrand).

  • Reading srid.map sometimes caused errors even if everything was alright.
    Report by Paul Dziemiela (@pauldzy), analysis by Christian Ullrich (@chrullrich).

  • Don't push down expressions with CLOB column references.
    Because of Oracle's inability to use CLOB in SQL expressions, this could lead to errors like

     ORA-00932: inconsistent datatypes: expected - got CLOB
    
  • Fix bug in pg_terminate_backend handling.
    pg_terminate_backend (or SIGTERM) was not handled correctly, since neither was the Oracle query canceled nor did the backend terminate.
    Reported by Dmitry Chirkin (@josser).

@laurenz laurenz released this Aug 5, 2016 · 148 commits to master since this release

Assets 14

Enhancements:

  • Add table option sample_percent to ANALYZE very large tables
    This can speed up ANALYZE significantly.
    Idea by @legrandlegrand.
  • Introduce a table option prefetch for the Oracle row prefetch count
    This can speed up foreign table scans.
    Per discussion with by @legrandlegrand and @3kkani.
  • Push down arbitrary IN and NOT IN expressions
    Up to now, only lists with constants were considered.
    Per request from @volkmarbuehringer.
  • Push down ORDER BY expressions to Oracle from PostgreSQL 9.2 on
    Only expressions of numeric, date and timestamp datatypes are pushed down, since the string collations in PostgreSQL and Oracle cannot be guaranteed to be the same.
    Courtesy of NTT OSS Center, patch by @yamatattsu.

Bugfixes:

  • Fix errors with now() and date/timestamp parameters in queries
    This bug was introduced in 1.3.0 and caused errors like
    ERROR: error executing query: OCIDateTimeFromText failed to convert parameter
    DETAIL: ORA-01843: not a valid month
    when now() or current_timestamp and friends or date/timestamp parameters were used.
    Report by Li Hailong.
  • Fix errors when updating date/timestamp columns
    This bug was also introduced in 1.3.0 and caused errors like
    ORA-01856: BC/B.C. or AD/A.D. required
    if the Oracle and PostgreSQL types were different.
    Report by @sttachoires.
  • IMPORT FOREIGN SCHEMA sometimes didn't import primary keys
    Report by @JMLessard, fix by @legrandlegrand.
  • Fix memory leaks during ANALYZE
    This caused out of memory errors when large tables were analyzed.
    Report by @acheccuc.
  • IMPORT FOREIGN SCHEMA should not tolerate missing remote schema
    It used to cause a warning, but the SQL standard requires an error.
    Report by @JMLessard.
  • Fix crash when UPDATEing non-existent columns
    If a foreign table has more columns than the underlying Oracle table, these additional columns are treated as containing NULLs.
    However, oracle_fdw crashed on an attempt to change such a column with an UPDATE statement, which should not happen.
    Reported by @fnicollet.
  • Fetch all columns from Oracle when the whole row is referenced
    This problem could lead to wrong NULL values in trigger functions or when the whole column is used in an expression.
    Reported by @fnicollet.

@laurenz laurenz released this Apr 8, 2016 · 178 commits to master since this release

Assets 12

Enhancements:

  • Add option readonly for IMPORT FOREIGN TABLE that sets the foreign table option readonly to true on all imported foreign tables.
    Idea by @jgoux.
  • Allow foreign tables based on arbitrary Oracle queries.
    The query, enclosed in parentheses, can be supplied as option table.
    Requested by @tsykes, @cirix81 and @jgoux.

Bugfixes:

  • Selecting timestamps with lc_messages other than English caused errors like
    ORA-01406: la valeur de la colonne extraite a été tronquée
    Report by @dszczyt.
  • Complicated queries could lead to an error like
    Internal oracle_fdw error: encountered unknown node type 524.
    Report by @bartonjd.
  • PostGIS type geometry cannot be found if ArcGIS is installed.
    Report by @dtoller.

@laurenz laurenz released this Dec 21, 2015 · 192 commits to master since this release

Assets 12

Enhancements:

  • Add support for IMPORT FOREIGN SCHEMA for PostgreSQL 9.5 and higher.
  • Improve cost estimates by using the row count estimate.
    Inspiration by Daniele Sevegnani.
  • Support two-dimensional geometries with an additional measure dimension.
    Idea by Paul Dziemiela.
  • Throw an error if oracle_close_connections() is called inside a transaction that modified Oracle data.

Bugfixes:

  • The server crashed for the constructs like <column> = ANY (NULL).
    Report and patch by dreckard.
  • oracle_fdw sometimes failed to recognize the SDO_GEOMETRY data type.
    Per report from Bevan Jenkins.
  • Some point geometries were not translated properly.
    Per report from Bevan Jenkins.
  • Ignore SDO_GEOMETRY elements with zero SDO_ETYPE.
    According to Oracle, that is the correct behaviour.
    Per report from Bevan Jenkins.
  • Fix EXPLAIN (VERBOSE) for queries containing current_timestamp.
    This caused "ORA-30081: invalid data type for datetime/interval arithmetic".
    Noticed by "kkwhite".
  • Oracle TIMESTAMP(0) fields caused errors like:
    ERROR: invalid input syntax for type timestamp: "1977-06-09 18:00:00."
    Also, handling of dates and timestamps before Christ was broken.
    Report by "abiuan".

@laurenz laurenz released this Feb 3, 2015 · 239 commits to master since this release

Assets 10

Enhancements:

  • Add support for a file "srid.map" to translate SRIDs between Oracle and PostGIS.
  • If the Oracle session has been terminated outside of a transaction, try to reconnect once.
    Idea by AVEN.

Bugfixes:

  • Prepared statements with parameters can crash.
    Because of custom plans, this does not manifest until the query has been executed several times in PostgreSQL 9.2 and higher.
    Per report from Krzysztof Gorczyński and others.
    This bug was introduced in 1.1.0.

@laurenz laurenz released this Dec 3, 2014 · 245 commits to master since this release

Assets 10

Enhancements:

  • Add efficient support for translating between Oracle SDO_GEOMETRY and PostGIS geometry.
    Supported geometry types are POINT, LINE, POLYGON, MULTIPOINT, MULTILINE and MULTIPOLYGON.
    Courtesy of Oslandia, implemented by Vincent Mora.
  • Add regression tests for improved quality.
  • Bind LOB data instead of LOB locators for INSERT and UPDATE.
    This simplifies the code and makes Oracle triggers on LOB columns behave as expected.

Bugfixes:

  • Fix a bug introduced in 1.0.0 that leads to crashes when LOB columns are modified.
  • Fix several crashes when the foreign table has fewer or more columns than the Oracle table.
  • Fix a bug that caused RETURNING <expression> to return NULL for complex expressions.
  • Writing date or timestamp columns failed when DateStyle was not ISO.
  • Reading or writing negative INTERVAL DAY TO SECOND resulted in bad values because the string formats in PostgreSQL and Oracle differ.

@laurenz laurenz released this Apr 8, 2014 · 330 commits to master since this release

Assets 8

Enhancements:

  • Add function oracle_diag(name) for diagnostic purposes.
    ATTENTION: Use “ALTER EXTENSION oracle_fdw UPDATE” when upgrading from a previous version of oracle_fdw.
  • Avoid unnecessary local filtering for pushed down WHERE clauses with
    internal parameters.
  • Add support for triggers on foreign tables for PostgreSQL 9.4.

Bugfixes:

  • Fix logic error that keeps Oracle connections from closing.
  • Fix “cache lookup failed for type 0” in queries with string parameters.
    Per report from Adolfho Lopes.
Pre-release

@laurenz laurenz released this Dec 24, 2013 · 341 commits to master since this release

Assets 2

Enhancements:

  • Add support for INSERT, DELETE and UPDATE.
    This is a major rewrite that might cause some destabilization in existing functionality.
  • Add new column option “key” to indicate primary key columns.
    This is needed for UPDATE and DELETE.
  • Add new table option “readonly” to forbid data modifying statements.
  • Improved transaction handling for data modifying statements.
    COMMIT, ROLLBACK and SAVEPOINT will work as expected.
  • Add paths for Oracle 12.1 to the Makefile.
    Patch by Guillaume Lelarge.

Bugfixes:

  • Don't try to push down the division operator.
    That would produce incorrect results for numeric data types.
Pre-release

@laurenz laurenz released this Dec 4, 2013 · 361 commits to master since this release

Assets 2

Enhancements:

  • Enable build with PostgreSQL 9.3.

Bugfixes:

  • Fix error ORA-01406: fetched column value was truncated caused by timestamps with precision greater than 6.
    Per report from David E. Wheeler.
  • Fix crash with IN lists that do not entirely consist of constants.
    Per report from Wang Dong.
  • Fix handling of parameters during pushdown of WHERE conditions.
    The previous implementation returned incorrect results for certain queries like SELECT ... WHERE colname = (SELECT ...)
    ATTENTION: Since correct handling of parameters is not possible before PostgreSQL 9.2, query parameters will not be pushed down in PostgreSQL 9.1.
    This is a regression for cases where this happened to work.
  • Fix a logical error that can lead to incorrect Oracle WHERE clauses.
  • Fix a bug that can lead to the incorrect omission of a scan clause, leading to wrong results.