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

Re: Select to other database's table

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: yudha <yudha(at)BonBon(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Select to other database's table
Date: 2002-11-28 07:21:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
On Thu, 2002-11-28 at 21:21, yudha wrote:
> Dear Milist;
> Please give me some advices and help. How can i do 
> "select" the TABLE_1 on other database DB_2, 
> but currently i'm connecting to on DB_1.
> Current_DB_1 #> Select * From DB_2.TABLE_1;
> MS-SQL :
> Current_DB_1 #> Select * From DB_2..TABLE_2;
> PostGre :
> Current_DB_1 #> How do i write...???

You cannot read from another database.  In 7.3, you can have multiple
schemas in one database and the syntax for reading a file from another
schema is:

  SELECT * FROM schema.table...

I understand that 7.3's release is imminent.

Oliver Elphick                                Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK                   
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
     "The earth is the LORD'S, and the fullness thereof; the
      world, and they that dwell therein."       Psalms 24:1

In response to

pgsql-admin by date

Next:From: Luis SousaDate: 2002-11-28 10:11:12
Subject: Re: Logrotate
Previous:From: Oliver ElphickDate: 2002-11-27 21:13:24
Subject: Re: Problems invoking psql, was: Re: Troubles at

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