Skip site navigation (1) Skip section navigation (2)

Re: connecting /sharing tables across databases

From: Mark Wimer <mwimer(at)usgs(dot)gov>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: connecting /sharing tables across databases
Date: 2008-11-19 18:17:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
In MSSQL, I have a dozen or so databases that rely on some shared tables 
(states, species lists, for example). I put the shared tables in a db 
called Common. To query them, mssql allows:

select statename, stateabbrev from common.dbo.statelist S inner join 
mytable on S.stateabbrev = mytable.stateabbrev

I'm not asking for PostgreSQL to be more like mssql, but I would like to 
share some lookup tables among applications & databases. In looking 
through the help, it appears from the "Schemas" help page 
( that 
PostgreSQL uses a single database per connection (pgAdmin client, web 
client). Is there a best practice or recommendation page for how to handle 
this sharing of a common lookup table? Or a help page I missed that 
discusses it?

Right now I see my options as:
a) put all applications for which I use PostgreSQL into one database, but 
different schemas.
b) use a client tool to make a separate connection and create a join 


In response to


pgsql-novice by date

Next:From: Sean DavisDate: 2008-11-19 18:46:35
Subject: Re: connecting /sharing tables across databases
Previous:From: Tom LaneDate: 2008-11-19 17:56:51
Subject: Re: ssl tunneling in postgres 8.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group