From: Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>
To: pgsql-sql@postgresql.org
Subject: Re: safely exchanging primary keys?
Date: Mon, 24 May 2010 19:00:30 +0200
Message-ID: <20100524170030.GB19481@apartia.fr> (raw)
In-Reply-To: <m3d3wl1i1c.fsf@passepartout.tim-landscheidt.de>
References: <20100524085101.GA21249@apartia.fr>
<m3d3wl1i1c.fsf@passepartout.tim-landscheidt.de>
On Mon, May 24, 2010 at 02:38:39PM +0000, Tim Landscheidt wrote:
> Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org> wrote:
>
> What does "are not properly updated" mean? Anyhow, why don't
Hi,
I did follow-up on my own post: the problem was elsewhere.
> you use something simple like (untested):
>
> | UPDATE cabin_type
> | SET id_cabin_type =
> | CASE
> | WHEN id_cabin_type = id1 THEN
> | id2
> | ELSE
> | id1
> | END
> | WHERE id_cabin_type IN (id1, id2);
Nice, thanks.
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: vindex+lists-pgsql-sql@apartia.org
Subject: Re: safely exchanging primary keys?
In-Reply-To: <20100524170030.GB19481@apartia.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