Move postgresql_fdw_validator into dblink

From: Shigeru HANADA <shigeru(dot)hanada(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Move postgresql_fdw_validator into dblink
Date: 2012-09-11 09:30:02
Message-ID: 504F049A.7050300@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'd like to propose moving postgresql_fdw_validator into contrib/dblink
as dblink's own validator.

Main purpose of this proposal is to reserve the name "postgresql_fdw"
for concrete FDW for PostgreSQL. I used to use "pgsql_fdw" as the name,
but in previous CF I got comments that full product name is appropriate
rather than abbreviation (e.g. pgsql_fdw) for FDW's name.

In addition, this change would avoid potential problem that third-party
product might use this validator and introduce undesirable dependency
between PG core.

This change breaks backward compatibility, but AFAIK no one except
dblink seems to use this validator, so it would not be serious problem.
# Please let me know if any product uses this validator!

Changes in this patch are:

1) Move postgresql_fdw_validator from core backend to contrib/dblink
with renaming to dblink_fdw_validator. Also I modified this validator
so that it uses PQconndefault() to get libpq's valid options instead of
having its own options list.

2) For ease of use, dblink's CREATE EXTENSION provides default FDW
dblink_fdw which accepts libpq's connection options via user mapping
("user" and secret options such as "password") and foreign server (all
other options).

3) Bump dblink's version to 1.1. Of cource upgrade script is provided.

4) Update documents. (Should we mention removal of
postgresql_fdw_validator?)

5) Use simplified postgresql_fdw_validator in regression test
foreign_data. I didn't change actual test cases because they don't seem
to depend on postgresql_fdw_validator deeply.

Comments and questions are welcome.
--
Shigeru HANADA

Attachment Content-Type Size
dblink_fdw_validator.patch text/plain 32.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hassan Syed 2012-09-11 13:37:17 [Feature Request] explaining sql statements executed in UDF's
Previous Message Jeff Davis 2012-09-11 07:13:13 Re: Question about SSI, subxacts, and aborted read-only xacts