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

Accessing tables in one database from another

From: Mary Anderson <maryfran(at)demog(dot)berkeley(dot)edu>
To: pgsql-novice(at)postgresql(dot)org
Subject: Accessing tables in one database from another
Date: 2007-11-16 23:07:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
    I originally created a database called memdev.  Then I created a 
second database called inputdev, and put in some files of stuff I wanted 
to process and then read into memdev.  I am not having much luck finding 
out how to do this from the postgres manual.   try to do this with

(SELECT * FROM inputdev.jpn_references

but i am just told that there is no schema named inputdev.  (So I should 
have put these tables in a schema, not a database!)

Question 1.  Can I login to memdev and do a SELECT on a table in 
inputdev?  If so, what is the syntax?

Question 2. How do I export my inputdev tables into memdev if I can't 
access them from memdev?  The manual for pg_dump and pg_restore only 
tells me about restoring into an empty database.


Mary Anderson


pgsql-novice by date

Next:From: Oliver ElphickDate: 2007-11-17 07:59:49
Subject: Re: [OT] Installing 8.3beta on debian (stable)
Previous:From: Sean DavisDate: 2007-11-16 22:28:03
Subject: Re: Building full-text index

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