Re: [GENERAL] How to access a second database

2017-10-31 Thread John R Pierce
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 sh

Re: [GENERAL] How to access a second database

2017-10-31 Thread John R Pierce
On 10/31/2017 12:15 AM, Sherman Willden wrote: I am trying to access a table from another database. I have the permissions to create under my own login. I have performed the following so far: sherman@sql-dev: createdb sandbox01 sherman@sql-dev:~$ createdb sandbox02. After logging into sandbox02

Re: [GENERAL] How to access a second database

2017-10-31 Thread Stanislav Ganin
Hello Sherman, You cannot cross reference databases like this in PG. You should re-think the schema you are going to use. Check this line from the documentation (https://www.postgresql.org/docs/current/static/ddl-schemas.html): “A PostgreSQL database cluster contains one or more named databases.