Jerome Wagner wrote:
[wants to access an application server farm with FDW]
> Clearly, I am trying to see how I could twist the fdw wrappers into a sort of manhole inside the
> application, without resorting to a classic event based mechanism.
That's too metaphorical for me to understand.
> I could also imagine very risky things (security wise) like :
>
> SELECT line FROM server1.execute WHERE command = 'wc -l /my/file' ORDER by lineno;
>
> and use pgadmin as general control mechanism for the cluster : the cluster and the data would be on
> the same SQL data plane :-)
Such things are conceivable, but that would subvert the concept of a FDW,
which is to translate SQL queries into a foreign API and convert the result
to PostgreSQL data.
I found that it is often a bad idea to use things in ways that are not intended
(it can be good fun though).
While you can certainly draw inspiration from existing FDW (where is a www_fdw for example),
what you want to do would mean writing a PostgreSQL module in C (or Python, if you use
Multicorn) for your application.
Yours,
Laurenz Albe