pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julio Cesar Sánchez González <knowhow@sistemasyconectividad.com.mx>
To: Chris Hoover <revoohc@gmail.com>
Cc: Michael Goldner <MGoldner@agmednet.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Joining tables in two different databases?
Date: Fri, 10 Aug 2007 21:22:20 -0500
Message-ID: <1186798940.6673.3.camel@andromeda> (raw)
In-Reply-To: <1d219a6f0708091208p6a17cafak83cb1d0beff4495d@mail.gmail.com>
References: <C2DFF594.138D2%mgoldner@agmednet.com>
	<1d219a6f0708091208p6a17cafak83cb1d0beff4495d@mail.gmail.com>

El jue, 09-08-2007 a las 15:08 -0400, Chris Hoover escribió:
> On 8/8/07, Michael Goldner <MGoldner@agmednet.com> wrote:
>         Is it possible to access tables in two different databases,
>         running on the
>         same server, from within psql?
>         

yes it is, with dblink.

follow next link:

http://www.postgresql.org/docs/faqs.FAQ.html

4.17) How do I perform queries using multiple databases?
There is no way to query a database other than the current one. Because
PostgreSQL loads database-specific system catalogs, it is uncertain how
a cross-database query should even behave.

contrib/dblink allows cross-database queries using function calls. Of
course, a client can also make simultaneous connections to different
databases and merge the results on the client side.


>         
>         
> Take a look at dblink in the contrib area.  I think it will give you
> what you are looking for.
> 
> Chris

-- 
Regards,

Julio Cesar Sánchez González
www.sistemasyconectividad.com.mx
blog: http://darkavngr.blogspot.com

---
Ahora me he convertido en la muerte, destructora de mundos.
Soy la Muerte que se lleva todo, la fuente de las cosas que vendran.




view thread (3+ messages)

Message-ID: <1186798940.6673.3.camel@andromeda>
Permalink:  ../1186798940.6673.3.camel@andromeda/
Also on:    postgresql.org/message-id/1186798940.6673.3.camel@andromeda

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: knowhow@sistemasyconectividad.com.mx, revoohc@gmail.com, MGoldner@agmednet.com
  Subject: Re: Joining tables in two different databases?
  In-Reply-To: <1186798940.6673.3.camel@andromeda>

* 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