Re: SQL/MED compatible connection manager - Mailing list pgsql-hackers

From Martin Pihlak
Subject Re: SQL/MED compatible connection manager
Date
Msg-id 49426E57.4050000@gmail.com
Whole thread Raw
In response to Re: SQL/MED compatible connection manager  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut wrote:
> Now the way I read the FDWs you provide (default and pgsql), you are
> creating your own API for initialization and options validation that is
> not in the standard.  That would appear to contradict the idea of a
> standard interface.  I understand that option validation is useful, and
> I don't see anything about it in the standard, but should we break the
> API like that?  What are your designs about this?
> 

Hmm, in that perspective it would make sense to make the InitializeFdw
function optional (it was, before I got worried about library reloads).
If no InitializeFdw is present, connection lookup and option validation
are disabled. All of the standard defined FDW functions are fetched by
load_external_function. This way we could have the additional features
and still be able to load standard conforming FDW's.

Actually it would make sense to use _PG_init instead of InitializeFdw.
This way it'd be called automatically on library load, the parameter(s)
would be passed in globals though.

regards,
Martin



pgsql-hackers by date:

Previous
From: Aidan Van Dyk
Date:
Subject: Re: Sync Rep: First Thoughts on Code
Next
From: "Rod Taylor"
Date:
Subject: Re: WIP: default values for function parameters