Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 0C46163249C for ; Mon, 24 May 2010 11:18:27 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 77566-01 for ; Mon, 24 May 2010 14:18:18 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from out02.mta.xmission.com (out02.mta.xmission.com [166.70.13.232]) by mail.postgresql.org (Postfix) with ESMTP id 9592A634CE5 for ; Mon, 24 May 2010 11:18:19 -0300 (ADT) Received: from in01.mta.xmission.com ([166.70.13.51]) by out02.mta.xmission.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1OGYTx-0006qo-5k; Mon, 24 May 2010 08:18:17 -0600 Received: from [208.187.158.94] (helo=[172.16.1.220]) by in01.mta.xmission.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1OGYTv-0007Vq-CY; Mon, 24 May 2010 08:18:17 -0600 Message-ID: <4BFA8B9F.9060008@gmail.com> Date: Mon, 24 May 2010 08:22:23 -0600 From: Rob Sargent User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100317 SUSE/3.0.4-1.1.1 Thunderbird/3.0.4 MIME-Version: 1.0 To: pgsql-sql@postgresql.org References: <20100524085101.GA21249@apartia.fr> <20100524140522.GA31971@apartia.fr> In-Reply-To: <20100524140522.GA31971@apartia.fr> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-XM-SPF: eid=; ; ; mid=; ; ; hst=in01.mta.xmission.com; ; ; ip=208.187.158.94; ; ; frm=robjsargent@gmail.com; ; ; spf=neutral X-SA-Exim-Connect-IP: 208.187.158.94 X-SA-Exim-Rcpt-To: pgsql-sql@postgresql.org, rsargent@amirsys.com X-SA-Exim-Mail-From: robjsargent@gmail.com X-Spam-DCC: XMission; sa01 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;pgsql-sql@postgresql.org X-Spam-Relay-Country: Subject: Re: safely exchanging primary keys? X-SA-Exim-Version: 4.2.1 (built Thu, 25 Oct 2007 00:26:12 +0000) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.001 tagged_above=-5 required=5 tests=BAYES_20=-0.001 X-Spam-Level: X-Archive-Number: 201005/105 X-Sequence-Number: 34153 And relying on keys for a sort order is a very wrong tree :) On 05/24/2010 08:05 AM, Louis-David Mitterrand wrote: > 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. >