Create an improved FDW option validator function for contrib/dblink.
Tom Lane <tgl@sss.pgh.pa.us>
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
Files
| Path | Change | +/− |
|---|---|---|
| contrib/dblink/dblink--1.0--1.1.sql | added | +14 −0 |
| contrib/dblink/dblink--1.1.sql (from contrib/dblink/dblink--1.0.sql) | renamed | +13 −1 |
| contrib/dblink/dblink.c | modified | +130 −0 |
| contrib/dblink/dblink.control | modified | +1 −1 |
| contrib/dblink/dblink.h | modified | +1 −0 |
| contrib/dblink/expected/dblink.out | modified | +14 −3 |
| contrib/dblink/Makefile | modified | +1 −1 |
| contrib/dblink/sql/dblink.sql | modified | +10 −3 |
| doc/src/sgml/dblink.sgml | modified | +4 −8 |