pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Wei Weng <wweng@kencast.com>
To: pgsql-sql@postgresql.org
Subject: Re: Comparing two tables of different database
Date: Fri, 01 May 2009 12:31:12 -0400
Message-ID: <49FB23D0.10403@kencast.com> (raw)
In-Reply-To: <618950b80905010855y70609c47j187f16967ab0da77@mail.gmail.com>
References: <e13d0d10904282339r1f853e1cpe3514e53ae47e5ef@mail.gmail.com>
	<cc4f12900904290533x5e1871fdu8f8a27dc956ca616@mail.gmail.com>
	<328DDBBB-31C4-41D7-BF0E-5ADD732F2B9F@mac.com>
	<20090430033747.GB1126@eddie>
	<e13d0d10904300312j5ec7baa1l3ae91724f6f5dbf8@mail.gmail.com>
	<006501c9c9e0$14d5c120$3e814360$@com>
	<618950b80905010855y70609c47j187f16967ab0da77@mail.gmail.com>



On 05/01/2009 11:55 AM, John Zhang wrote:
>
> Hi Nicholas,
>
> The query is across database query. dblink is needed for that task.
>
> Hope it helps,
>
> John
>
> On Thu, Apr 30, 2009 at 3:07 PM, Edward W. Rouse 
> <erouse@comsquared.com <mailto:erouse@comsquared.com>> wrote:
>
>     Can’t you use this?
>
>     select name from database2.sr_1 where name not in (select name
>     from database2.pr_1);
>
>     My test database VM isn’t running so I can’t test it, but I seem
>     to remember that that’s how I did it for a few queries of that
>     type. This is assuming the 2 databases are running on the same
>     machine, like the way there is template0 as the default and you
>     add addition databases to the same ‘instance’. If you are talking
>     about 2 different database servers, then I have no idea.
>
>     Edward W. Rouse
>
How do you formulate the query using dblink?

Thanks
Wei




view thread (18+ messages)  latest in thread

Message-ID: <49FB23D0.10403@kencast.com>
Permalink:  ../49FB23D0.10403@kencast.com/
Also on:    postgresql.org/message-id/49FB23D0.10403@kencast.com

 · 

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: wweng@kencast.com
  Subject: Re: Comparing two tables of different database
  In-Reply-To: <49FB23D0.10403@kencast.com>

* 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