pgsql: Introduce less-bogus handling of collations in contrib/postgres_

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Introduce less-bogus handling of collations in contrib/postgres_
Date: 2013-03-13 23:46:40
Message-ID: E1UFvNY-0005R8-Qz@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Introduce less-bogus handling of collations in contrib/postgres_fdw.

Treat expressions as being remotely executable only if all collations used
in them are determined by Vars of the foreign table. This means that, if
the foreign server gets different answers than we do, it's the user's fault
for not having marked the foreign table columns with collations equivalent
to the remote table's. This rule allows most simple expressions such as
"var < 'constant'" to be sent to the remote side, because the constant
isn't determining the collation (the Var's collation would win). There's
still room for improvement, but it's hard to see how to do it without a
lot more knowledge and/or assumptions about what the remote side will do.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/ed3ddf918b59545583a4b374566bc1148e75f593

Modified Files
--------------
contrib/postgres_fdw/deparse.c | 416 +++++++++++++++++++++---
contrib/postgres_fdw/expected/postgres_fdw.out | 95 +++++-
contrib/postgres_fdw/sql/postgres_fdw.sql | 23 ++-
3 files changed, 474 insertions(+), 60 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Kevin Grittner 2013-03-14 01:23:36 pgsql: Fix bug in dumping prior releases due to MV REFRESH dependency c
Previous Message Tom Lane 2013-03-12 23:06:58 pgsql: Fix documentation oversight.