X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 992E4D1B489 for ; Tue, 22 Jun 2004 14:20:52 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 74369-05 for ; Tue, 22 Jun 2004 17:20:49 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 9BAA8D1B37D for ; Tue, 22 Jun 2004 14:20:45 -0300 (ADT) Received: (qmail 19409 invoked by uid 500); 22 Jun 2004 17:27:04 -0000 Date: Tue, 22 Jun 2004 12:27:04 -0500 From: Bruno Wolff III To: Matthew Nuzum Cc: pgsql-sql@postgresql.org Subject: Re: matching rows differing only by fkey,pkey Message-ID: <20040622172704.GA19163@wolff.to> Mail-Followup-To: Matthew Nuzum , pgsql-sql@postgresql.org References: <200406221634.i5MGYcnb009716@ms-smtp-02.tampabay.rr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200406221634.i5MGYcnb009716@ms-smtp-02.tampabay.rr.com> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/208 X-Sequence-Number: 18153 On Tue, Jun 22, 2004 at 12:34:35 -0400, Matthew Nuzum wrote: > Any ideas? If someone has an alternate method of achieving the same result > I'd be excited to hear about it. A more precise formulation of what exactly you are doing might be helpful. From your description it sounds like you should already know the primary key of the row you are copying and can use currval to get the id of the row just inserted. I get the impression that you are manually using these values instead of having a script do it. But it should be easy to write a script that does this for you.