Re: pgsql_fdw, FDW for PostgreSQL server
Shigeru Hanada <shigeru.hanada@gmail.com>
From: Shigeru Hanada <shigeru.hanada@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter_e@gmx.net>, Robert Haas <robertmhaas@gmail.com>, Kevin Grittner <Kevin.Grittner@wicourts.gov>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Kohei KaiGai <kaigai@kaigai.gr.jp>, Albe Laurenz <laurenz.albe@wien.gv.at>, Martijn van Oosterhout <kleptog@svana.org>, Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>, Hitoshi Harada <umi.tanuki@gmail.com>
Date: 2012-03-01T11:56:02Z
Lists: pgsql-hackers
Attachments
- move_validator.patch (text/plain) patch
(2012/03/01 0:33), Tom Lane wrote: > I don't think that creating such a dependency is acceptable. > Even if we didn't mind the dependency, you said yourself that > contrib/postgresql_fdw's validator will accept stuff that's not > appropriate for dblink. Agreed. I think that these two contrib modules (and all FDW modules) should have individual validator for each to avoid undesirable dependency and naming conflict, and such validator function should be inside each module, but not in core. How about moving postgresql_fdw_validator into dblink, with renaming to dblink_fdw_validator? Attached patch achieves such changes. I've left postgresql_fdw_validator" in foreign_data regression test section, so that foreign_data section can still check whether FDW DDLs invoke validator function. I used the name "postgresql_fdw_validator" for test validator to make change as little as possible. This change requires dblink to have new function, so its version should be bumped to 1.1. These changes have no direct relation to PostgreSQL FDW, so this patch can be applied by itself. If this patch has been applied, I'll rename pgsql_fdw to postgresql_fdw which contains product name fully spelled out. -- Shigeru Hanada