(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 dblink connection. 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); -- Shigeru Hanada -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers