Martin Pihlak wrote:
How about extending the syntax by adding validator function(s) instead (similar
to CREATE LANGUAGE)? For instance for postgresql wrapper we might want to check
that a password is provided for a user mapping. The default validator for 
postgres
wrapper would be supplied, but nothing prevents the user from replacing it with
custom validator. Additionally it is possible to run-the same validator by
connection lookup, so that the connection can be sanity checked.

Additionally, if we are taking this route, it no longer makes sense to provide
the empty shared libraries. We could drop the shared libraries altogether and
loosen the syntax to:

CREATE FOREIGN DATA WRAPPER postgresql VALIDATOR postgresql_fdw_validator;
or just:
CREATE FOREIGN DATA WRAPPER postgresql;

I have implemented this now.

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to