Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 882A9633E7B for ; Mon, 24 May 2010 11:05:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 14117-04 for ; Mon, 24 May 2010 14:05:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sargon.lncsa.com (mail.lncsa.com [213.215.28.11]) by mail.postgresql.org (Postfix) with ESMTP id 6CEB86325F9 for ; Mon, 24 May 2010 11:05:25 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by sargon.lncsa.com (Postfix) with ESMTP id 73C38301E6F1 for ; Mon, 24 May 2010 16:05:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at lncsa.com Received: from sargon.lncsa.com ([127.0.0.1]) by localhost (sargon.lncsa.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CRoZpgp9Ofqr for ; Mon, 24 May 2010 16:05:23 +0200 (CEST) Received: from zenon.apartia.fr (zenon.apartia.fr [10.0.3.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "zenon.apartia.fr", Issuer "ca.apartia.fr" (verified OK)) by sargon.lncsa.com (Postfix) with ESMTP id 54660301E6EC for ; Mon, 24 May 2010 16:05:23 +0200 (CEST) Received: from galba.apartia.fr (galba.apartia.fr [10.0.3.119]) by zenon.apartia.fr (Postfix) with ESMTP id 11AAE5924B262 for ; Mon, 24 May 2010 16:05:22 +0200 (CEST) Received: by galba.apartia.fr (Postfix, from userid 1000) id B56304C933; Mon, 24 May 2010 16:05:22 +0200 (CEST) Date: Mon, 24 May 2010 16:05:22 +0200 From: Louis-David Mitterrand To: pgsql-sql@postgresql.org Subject: Re: safely exchanging primary keys? Message-ID: <20100524140522.GA31971@apartia.fr> Mail-Followup-To: pgsql-sql@postgresql.org References: <20100524085101.GA21249@apartia.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100524085101.GA21249@apartia.fr> User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.001 tagged_above=-5 required=5 tests=BAYES_40=-0.001 X-Spam-Level: X-Archive-Number: 201005/104 X-Sequence-Number: 34152 On Mon, May 24, 2010 at 10:51:01AM +0200, Louis-David Mitterrand wrote: > Hi, > > I have this function which swaps primary keys for cabin_types (so that > id_cabin_type ordering reflects natural data ordering): Actually this function works fine. My problem was elsewhere. Sorry for barking up the wrong tree.