From: | Patrick FICHE <Patrick(dot)Fiche(at)aqsacom(dot)com> |
---|---|
To: | pgsql-generallists(dot)postgresql(dot)org <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | RE: Execute a function through fdw |
Date: | 2019-10-18 15:53:25 |
Message-ID: | AM5PR0501MB25636BE5C652B679D670DADBEF6C0@AM5PR0501MB2563.eurprd05.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I got one more issue after I created my view.
I created it on my Server 1 but I am unable to view it on the Server 2.
I can see all tables through fdw after IMPORT FOREIGN SCHEMA.
I was able to get access to my view only after recreating the SERVER / USER MAPPING on Server 2.
Is it the expected behavior to recreate the FOREIGN SERVER / SCHEMA after a new table or view has been created ?
Regards,
Patrick Fiche
Database Engineer, Aqsacom Sas.
c. 33 6 82 80 69 96
-----Original Message-----
From: Patrick FICHE <Patrick(dot)Fiche(at)aqsacom(dot)com>
Sent: Friday, October 18, 2019 2:35 PM
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>; Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: pgsql-generallists.postgresql.org <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: RE: Execute a function through fdw
Thanks a lot for your answer.
Using a view is really a good solution for my case.
As I already use fdw for some other cases, I prefer not to mix with dblink.
Regards,
Patrick Fiche
-----Original Message-----
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Sent: Friday, October 18, 2019 1:55 PM
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: Patrick FICHE <Patrick(dot)Fiche(at)aqsacom(dot)com>; pgsql-generallists.postgresql.org <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Execute a function through fdw
Guillaume Lelarge <guillaume(at)lelarge(dot)info> writes:
> Le ven. 18 oct. 2019 à 11:51, Patrick FICHE
> <Patrick(dot)Fiche(at)aqsacom(dot)com> a écrit :
>> Is it possible to execute a function located on a server accessed
>> through Postgres fdw.
> It's probably easier to create a view on the remote server, and access
> it as a foreign table on the local server.
Yeah. Or if you really want to call a remote function by name, see dblink. postgres_fdw actively avoids doing that sort of thing.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Guillaume Lelarge | 2019-10-18 15:56:09 | Re: Execute a function through fdw |
Previous Message | Rob Sargent | 2019-10-18 15:43:15 | Re: DBD::Pg exorts char columns with trailing blanks |