(2012/02/29 4:07), Peter Eisentraut wrote:
> Let's at least be clear about the reasons here. The fact that
> postgresql_fdw_validator exists means (a) there is a possible naming
> conflict that has not been discussed yet, and/or (b) the name is already
> settled and we need to think of a way to make postgresql_fdw_validator
> work with the new actual FDW.
We can avoid conflict of name by using postgres_fdw or pgsql_fdw, but it
doesn't solve fundamental issue. ISTM that maintaining two similar
validators is wasteful and confusing, and FDW for PostgreSQL should be
just one, at least in the context of core distribution.
Current pgsql_fdw_validator accepts every FDW options which is accepted
by postgresql_fdw_validator, and additionally accepts FDW specific
options such as fetch_count. So, if dblink can ignore unknown FDW
options, pgsql_fdw_validator can be used to create foreign servers for
How about removing postgresql_fdw_validator from backend binary, and
changing dblink to use contrib/postgresql_fdw's validator? It breaks
some backward compatibility and requires contrib/postgresql_fdw to be
installed before using contrib/dblink with foreign servers, but ISTM
that it doesn't become so serious.
Of course dblink is still available by itself if user specifies
connection information with "key = value" string, not with server name.
One concern is how to avoid duplicated list of valid libpq options.
Adding new libpq function, like below, which returns 1 when given name
is a valid libpq option would help.
int PQisValidOption(const char *keyword);
In response to
pgsql-hackers by date
|Next:||From: Pavel Stehule||Date: 2012-02-29 10:37:46|
|Subject: Re: pgsql_fdw, FDW for PostgreSQL server|
|Previous:||From: Amit Kapila||Date: 2012-02-29 09:28:04|
|Subject: Re: Parameterized-path cost comparisons need some work|