forked from laurenz/oracle_fdw
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CHANGELOG
489 lines (445 loc) · 21.9 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
Version 2.5.0
Bugfixes:
- Use the correct user mapping for views on foreign tables.
This should use the mapping associated with the view owner.
Reported by "JSilex".
- Fix a spurious error on UPDATE or DELETE if the column options "key" and
"strip_zeros" are used on the same column.
Report and patch by Noriyoshi Shinoda.
- Fix "out of memory" and other errors on Linux systems with FIPS enabled.
The cause is that calculating MD5 hashes on such systems causes errors.
Reported by Hank Drews.
Version 2.4.0, released 2021-09-24
Enhancements:
- Support push-down of "uuid" values.
Per request from Asish Kumar Gaddipati.
- Introduce a server option "nchar", turned "off" by default.
This option, if set, enables the fix for NCHAR and NVARCHAR2 columns
introduced in 2.3.0.
We don't want that by default, since it causes a noticable performance
hit and makes UPDATEs with long strings fail with ORA-01461.
Problem reports by "threenotrump", "CHunter" and Phil Florent.
- Push down LIMIT clauses if possible.
These are pushed down as FETCH FIRST n ROWS ONLY from Oracle 12.2 on.
Based on a patch by Gilles Darold, per request from Ilia Sazonov.
Bugfixes:
- Fix a performance regression introduced in 2.3.0 by the fix for NCHAR
and NVARCHAR2 columns.
Reported by Phil Florent.
- Fix a crash with type coerced array parameters.
This can make queries fail with a WHERE condition like
WHERE varcharcol = ANY ($1);
where $1 is a text[].
Reported by "samuelchoi16".
- Fix numeric precision in IMPORT FOREIGN SCHEMA.
In Oracle the precision of a NUMBER can be less than the scale,
but that is not allowed in PostgreSQL.
That leads to errors during IMPORT.
Reported by Alberto Dell'Era.
- Translate Oracle NUMBER to "boolean" correctly.
The documentation says that numbers greater than 0 are mapped to
TRUE, but oracle_fdw gagged on numbers greater than 1 with errors like
ERROR: invalid input syntax for type boolean: "2"
Reported by Maris Zinbergs.
- Fix crash during ANALYZE of certain foreign tables.
If the Oracle table has more columns than the foreign table,
ANALYZE on the foreign table caused a crash.
Reported by Jan.
- Fix build with unset ORACLE_HOME and Instant Client 21.
Reported by "fjf2002".
- Use the correct user mapping in SECURITY DEFINER contexts.
Before this, oracle_fdw always used the current user to
determine the security context, which is wrong if a
foreign table was accessed in a SECURITY DEFINER function.
Reported by "ksmalara".
Version 2.3.0, released 2020-09-24
Note: When upgrading from an older version of oracle_fdw, make sure to run
ALTER EXTENSION oracle_fdw UPDATE;
after installing the extension.
Enhancements:
- Support PostgreSQL v13. Support for 9.2 and 9.1 is dropped.
- Add a function "oracle_execute" to execute arbitrary SQL statements on
Oracle. The statements must not return a result (e.g. DDL statements).
- Add an option "dblink" for Oracle database links.
The option can be used on foreign tables or with IMPORT FOREIGN SCHEMA.
Patch by Nicolas Boullis.
- Add a column option "strip_zeros" that automatically strips ASCII 0
characters from strings.
Per request from Alexander Lampalzer.
- New IMPORT FOREIGN SCHEMA options "max_long", "sample_percent" and
"prefetch". These set the corresponding options on imported tables.
Suggested by "ferfebles".
- Add support for isolation levels other than SERIALIZABLE.
This is mostly because Oracle's implementation of SERIALIZABLE is so buggy.
Patch by Jet C.X. Zhang.
Bugfixes:
- Fix bad results with uncorrelated subqueries.
This affects queries have a foreign scan with a filter based on a subplan.
Reported by "srakazmus".
- Fix "Internal oracle_fdw error: encountered unknown node type 144"
This can happen in plans involving tables with identity columns.
Reported by Yang Lin.
- Don't throw an error if DML statements modify no rows.
This might be caused by a trigger on the Oracle side.
Reported by Andrey Marinchuk.
- Fix NCHAR and NVARCHAR2 handling.
With single-byte Oracle character sets, this bug led to replacement
characters being used for characters not in the database character set.
Reported by "srakazmus", and Christian Ullrich helped with the fix.
- Report a proper error for INSERT ... ON CONFLICT on partitioned tables.
Report and fix by Ian Barwick.
- Fix INSERT ... RETURNING if a table partition is a foreign table.
It used to return NULL values by mistake.
Report and analysis by Ian Barwick.
Version 2.2.0, released 2019-10-10
Enhancements:
- Add support for COPY to foreign tables (from PostgreSQL v11 on).
This caused a crash before, as reported by "jkldv".
- Add a new "collation" option for IMPORT FOREIGN SCHEMA that controls
case folding.
Patch by Sahap Asci.
- Add support for Oracle XMLTYPE.
- Set V$SESSION_CONNECT_INFO.CLIENT_DRIVER to "oracle_fdw".
This makes it easier to identify the session on the Oracle side.
Bugfixes:
- Fix crash or bad results with pushed down join queries.
The query target list can change during query planning, but oracle_fdw
relied on the one from before.
This bug only manifests in PostgreSQL v11.
Bug found by Jaime Casanova and fixed by Tatsuro Yamada.
- Fix push-down of foreign scan conditions with variables belonging
to other tables.
This can lead to wrong results and warnings like:
WARNING: column number x of foreign table "y" does not exist in
foreign Oracle table, will be replaced by NULL
- Fix crash in UPDATE or DELETE where the optimizer can deduce that no
scan is required, for example with "WHERE 1 = 0".
Reported by Andy Shipman.
- Fix crash or bad results in queries with IN or "= ANY" where the element
type on the right-hand side is different from the left-hand side type.
- Add support for reading infinite NUMBERs.
Oracle NUMBER has infinite values, which are represented as "~" and "-~".
Since PostgreSQL's "numeric" does not know infinity, map these values
to NaN in this case. For "real" and "double precision" we can use the
normal infinity values.
- The "readonly" option of IMPORT FOREIGN SCHEMA didn't work properly:
When set to "false", it would still create read-only foreign tables.
Reported by Jacob Roberts.
Version 2.1.0, released 2018-10-01
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 Christian Ullrich.
- Enable delayed loading of the Oracle DLL on Windows.
This allows better diagnostic messages if the library cannot be loaded.
Patch by Christian Ullrich.
- Report the correct SQLSTATE for constraint violation and deadlock errors.
Idea by "omistler".
- Push down outer joins to Oracle.
Patch by Tatsuro Yamada, 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 Tatsuro Yamada 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 Tatsuro Yamada.
Version 2.0.0, released 2017-09-15
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, 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.
- Reading "srid.map" sometimes caused errors even if everything was alright.
Report by Paul Dziemiela, analysis by Christian Ullrich.
- 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 the Oracle query was canceled nor did
the backend terminate.
Reported by Dmitry Chirkin.
Version 1.5.0, released 2016-08-05
Enhancements:
- Add table option "sample_percent" to ANALYZE very large tables
This can speed up ANALYZE significantly.
Idea by PAscal Lemoy.
- Introduce a table option "prefetch" for the Oracle row prefetch count
This can speed up foreign table scans.
Per discussion with by PAscal Lemoy and Maurizio De Giorgi.
- Push down arbitrary IN and NOT IN expressions
Up to now, only lists with constants were considered.
Per request from Volkmar Bühringer.
- 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 Tatsuro Yamada.
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 Stephane Tachoires.
- IMPORT FOREIGN SCHEMA sometimes didn't import primary keys
Report by Jean-Marc Lessard, fix by PAscal Lemoy.
- Fix memory leaks during ANALYZE
This caused out of memory errors when large tables were analyzed.
Report by Alessio Checcucci.
- IMPORT FOREIGN SCHEMA should not tolerate missing remote schema
It used to cause a warning, but the SQL standard requires an error.
Report by Jean-Marc Lessard.
- 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 Fabien Nicollet.
- 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 Fabien Nicollet.
Version 1.4.0, released 2016-04-08
Enhancements:
- Add option "readonly" for IMPORT FOREIGN TABLE that sets the foreign table
option "readonly" to "true" on all imported foreign tables.
Idea by Julien Goux.
- Allow foreign tables based on arbitrary Oracle queries.
The query, enclosed in parentheses, can be supplied as option "table".
Requested by "tsykes", "cirix81" and Julien Goux.
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 Damien Szczyt.
- 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".
Version 1.3.0, released 2015-12-21
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".
Version 1.2.0, released 2015-01-03
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.
Version 1.1.0, released 2014-12-03
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.
Version 1.0.0, released 2014-04-08
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.
Version 0.9.10 (beta), released 2013-12-24
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.
Version 0.9.9 (beta), released 2013-08-07
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.
Version 0.9.8 (beta), released 2012-10-16
Enhancements:
- Add support for pushdown of IN and NOT IN clauses in WHERE conditions.
As suggested by Wang Dong.
Bugfixes:
- Add check to make sure that character string data are properly encoded.
This is necessary because Oracle does not check this properly.
Per report from David E. Wheeler.
Version 0.9.7 (beta), released 2012-09-07
Bugfixes:
- Avoid failure to describe synonyms under certain conditions.
ATTENTION: This constitutes a compatibility break: table and schema names
now have to be exactly as they are in Oracle's catalogs, i.e. without
double quotes and normally in uppercase.
Per report from Bry Lo.
- Add paths to Makefile so that we can build with Instant Client RPMs.
Noticed by Andrew Theaker.
- Fix a memory corruption bug that can lead to crashes, errors and
wrong results.
- Improve bad performance of "SELECT count(*)" on foreign tables.
This is a simple workaround for the (not yet confirmed)
Oracle bug 14562530.
Version 0.9.6 (beta), released 2012-06-25
Enhancements:
- Support Oracle types LONG and LONG RAW.
Introduce table option "max_long" (default 32767) to set the maximal
length of such columns.
Bugfixes:
- Fix a bug that causes a server crash when the PostgreSQL session is
terminated if the only statements involving oracle_fdw during that
session were CREATE statements.
Per report from Bry Lo.
Version 0.9.5 (beta), released 2012-05-11
Enhancements:
- Support ANALYZE on foreign tables (from PostgreSQL 9.2 on).
Bugfixes:
- Fix a bug that leads to warnings and sometimes bad results if system
columns of the foreign table are referenced.
- Fix wrong column width estimates of plan_costs=on.
Version 0.9.4 (beta), released 2012-03-19
Enhancements:
- Support the new foreign data wrapper API introduced in 9.2.
In PostgreSQL 9.2 and above, WHERE conditions that get pushed down to
Oracle will not be checked a second time.
- Improve error messages for errors during conversion of Oracle data
so that the problem can be diagnosed.
Bugfixes:
- Fix uninitialized value that caused intermittent server crashes.
Per report from Bruno Voigt.
- Rework the handling of errors and transactions. Now an error should not
be able to cause an Oracle transaction to be left open. This also fixes
a bug introduced in 0.9.3 that prevented Oracle errors from being
reported as DETAIL message. Also, all foreign scans in one local query
will now be executed within one Oracle transaction if they belong to
the same Oracle session.
- Rework memory management to exclude memory leaks under all circumstances.
Version 0.9.3 (beta), released 2012-02-07
Enhancements:
- Add support for PostgreSQL data type "uuid".
Bugfixes:
- After an error message, calls to the foreign server result in this error:
error connecting to Oracle: OCITransStart failed to start a transaction
ORA-01453: SET TRANSACTION must be first statement of transaction
The problem is that the previous transaction was not closed.
This used to go unnoticed, the problem now becomes manifest because we
explicitly start a serializable transaction.
Per reports from Keith Fiske and Bruno Voigt.
Version 0.9.2 (beta), released 2011-12-30
Bugfixes:
- Fix handling of Oracle BFILE columns. This was totally broken; attempts
to select such columns resulted in the error message
'ORA-00932: inconsistent datatypes: expected %s got %s'.
Bug report and patch by Dominique Legendre.
- Use a serializable transaction in Oracle to make sure that consistent
data are retrieved during a rescan.
Version 0.9.1 (beta), released 2011-09-14
Bugfixes:
- Fix incorrect use of an automatic variable for binding timestamp parameters
in Oracle.
- Remove unnecessary lvalue casts.
These violate the C standard and cause errors on gcc 4.
Per report from Dominique Legendre.
- Fix lack of support for dropped columns in foreign table.
oracle_fdw incorrectly assumed that the n-th PostgreSQL column corresponds
to the n-th Oracle column. This leads to confusion in the presence of
dropped columns, which retain an entry in pg_attribute.
Per report from Dominique Legendre.
- Fix typo that caused wrong and negative sizes being assumed for longer
Oracle columns. This led to palloc() errors and Oracle fetch errors.
Per report from Dominique Legendre.
Version 0.9 (beta), released 2011-08-25
- initial release