From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix contrib/dblink to handle inconsistent DateStyle/IntervalStyl |
Date: | 2013-03-22 19:23:07 |
Message-ID: | E1UJ7YR-0004ZC-G4@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix contrib/dblink to handle inconsistent DateStyle/IntervalStyle safely.
If the remote database's settings of these GUCs are different from ours,
ambiguous datetime values may be read incorrectly. To fix, temporarily
adopt the remote server's settings while we ingest a query result.
This is not a complete fix, since it doesn't do anything about ambiguous
values in commands sent to the remote server; but there seems little we
can do about that end of it given dblink's entirely textual API for
transmitted commands.
Back-patch to 9.2. The hazard exists in all versions, but this patch
would need more work to apply before 9.2. Given the lack of field
complaints about this issue, it doesn't seem worth the effort at present.
Daniel Farina and Tom Lane
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/8a3b6772aedbd95557ab1fc489ddf007ac9d405d
Modified Files
--------------
contrib/dblink/dblink.c | 105 ++++++++++++++++++++-
contrib/dblink/expected/dblink.out | 176 ++++++++++++++++++++++++++++++++++++
contrib/dblink/sql/dblink.sql | 96 ++++++++++++++++++++
3 files changed, 372 insertions(+), 5 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-03-22 21:22:41 | pgsql: Document cross-version compatibility issues for contrib/postgres |
Previous Message | Kevin Grittner | 2013-03-22 18:28:55 | pgsql: Fix problems with incomplete attempt to prohibit OIDS with MVs. |