On 10/31/2017 12:41 AM, John R Pierce wrote:
if you're doing a lot of this, why not use two schema in the same
database? then its just ...schema.table...
otherwise, you need to use FDW and foreign tables.
see....
https://www.postgresql.org/docs/current/static/postgres-fdw.html
oh, I should add... the advantage of using FDW is the other database can
be on another server. the disadvantage is, the remote data has to be
queried and merged with the local query, the optimizer may not be able
to do as good a job as it might with tables in different schema of the
same database (which are treated exactly the same as tables in the same
schema, other than naming).
--
john r pierce, recycling bits in santa cruz
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general