Search Postgresql Archives

Re: How to access a second database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux