Thread: pgsql: Create an improved FDW option validator function for contrib/dbl

pgsql: Create an improved FDW option validator function for contrib/dbl

From
Tom Lane
Date:
Create an improved FDW option validator function for contrib/dblink.

dblink now has its own validator function dblink_fdw_validator(), which is
better than the core function postgresql_fdw_validator() because it gets
the list of legal options from libpq instead of having a hard-wired list.

Make the dblink extension module provide a standard foreign data wrapper
dblink_fdw that encapsulates use of this validator, and recommend use of
that wrapper instead of making up wrappers on the fly.

Unfortunately, because ad-hoc wrappers *were* recommended practice
previously, it's not clear when we can get rid of postgresql_fdw_validator
without causing upgrade problems.  But this is a step in the right
direction.

Shigeru Hanada, reviewed by KaiGai Kohei

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/8255566f9d479fdfeea09da3141d26afdbb5abe2

Modified Files
--------------
contrib/dblink/Makefile             |    2 +-
contrib/dblink/dblink--1.0--1.1.sql |   14 ++
contrib/dblink/dblink--1.0.sql      |  223 ---------------------------------
contrib/dblink/dblink--1.1.sql      |  235 +++++++++++++++++++++++++++++++++++
contrib/dblink/dblink.c             |  130 +++++++++++++++++++
contrib/dblink/dblink.control       |    2 +-
contrib/dblink/dblink.h             |    1 +
contrib/dblink/expected/dblink.out  |   17 ++-
contrib/dblink/sql/dblink.sql       |   13 ++-
doc/src/sgml/dblink.sgml            |   12 +--
10 files changed, 410 insertions(+), 239 deletions(-)


Re: pgsql: Create an improved FDW option validator function for contrib/dbl

From
Andrew Dunstan
Date:
On 10/10/2012 04:53 PM, Tom Lane wrote:
> Create an improved FDW option validator function for contrib/dblink.

This seems to have broken a bunch of buildfarm members.

cheers

andrew





Andrew Dunstan <andrew@dunslane.net> writes:
> On 10/10/2012 04:53 PM, Tom Lane wrote:
>> Create an improved FDW option validator function for contrib/dblink.

> This seems to have broken a bunch of buildfarm members.

Oh, yuck.  It looks like the problem is that the list of allowed
connection options varies depending on configure options.

I think the best solution is to take out the test cases that trigger
those errors.  It's not like they're telling us anything very interesting.

Will fix, thanks for the heads-up.

            regards, tom lane