Re: Accessing a database form another database - Mailing list pgsql-general

From David Fetter
Subject Re: Accessing a database form another database
Date
Msg-id 20090810165706.GL25552@fetter.org
Whole thread Raw
In response to Accessing a database form another database  (Bill Thoen <bthoen@gisnet.com>)
List pgsql-general
On Mon, Aug 10, 2009 at 10:48:10AM -0600, Bill Thoen wrote:
> I've got some GIS tables that I want to use across several projects
> and  currently I've got each project in a separate database. So say
> I've got  two databases, one for the Spacely Sprookets project and
> one for the  Cogswell Cogs contract, but I want to access my
> WorldMap tables in my  GIS database to make maps for both of these
> projects.  How do I  reference a table that's in another database?
> Or should I organize my PostgreSQL data differently?

That last is much easier.  Create a schema each for Spacely and
Cogswell, then one for WorldMap.

http://www.postgresql.org/docs/current/static/sql-createschema.html

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: NOTICE: there is no transaction in progress
Next
From: Tom Lane
Date:
Subject: Re: PQstatus does not seem to work