pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stéphane RIFF <stephane.riff@cerene.fr>
To: pgsql-sql@postgresql.org
Subject: Query two database at once
Date: Mon, 02 May 2005 17:36:05 +0200
Message-ID: <427648E5.6080306@cerene.fr> (raw)

Hi,

I want to ewecute a query on two database like this :

SELECT * FROM table01 T1, table02 T2 WHERE T1.gid=T2.gid AND 
T2.my_field='".$value."'

The problem is that table01 is in a different database than table02 and 
i don't know how to telle postgresql
to look in two db.
Is there a solution other than execute two query ?
Thanks



view thread (2+ messages)  latest in thread

Message-ID: <427648E5.6080306@cerene.fr>
Permalink:  ../427648E5.6080306@cerene.fr/
Also on:    postgresql.org/message-id/427648E5.6080306@cerene.fr

 · 

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-sql@postgresql.org
  Cc: stephane.riff@cerene.fr
  Subject: Re: Query two database at once
  In-Reply-To: <427648E5.6080306@cerene.fr>

* 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