pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Elphick <olly@lfix.co.uk>
To: yudha <yudha@BonBon.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Select to other database's table
Date: 28 Nov 2002 07:21:53 +0000
Message-ID: <1038468113.13298.308.camel@linda.lfix.co.uk> (raw)
In-Reply-To: <008a01c29724$12a78320$ea00a8c0@yudha>
References: <008a01c29724$12a78320$ea00a8c0@yudha>

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.
>  
> ORACLE : 
> 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.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
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

Attachments:

  signature.asc (application/pgp-signature, 188B) download

view thread (2+ messages)  latest in thread

Message-ID: <1038468113.13298.308.camel@linda.lfix.co.uk>
Permalink:  ../1038468113.13298.308.camel@linda.lfix.co.uk/
Also on:    postgresql.org/message-id/1038468113.13298.308.camel@linda.lfix.co.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: olly@lfix.co.uk, yudha@BonBon.net
  Subject: Re: Select to other database's table
  In-Reply-To: <1038468113.13298.308.camel@linda.lfix.co.uk>
  References: <008a01c29724$12a78320$ea00a8c0@yudha> <1038468113.13298.308.camel@linda.lfix.co.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox