From: Scott Marlowe <scott.marlowe@gmail.com>
To: Stuart McGraw <smcg2297@frii.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: changing multiple pk's in one update
Date: Fri, 10 Apr 2009 12:20:20 -0600
Message-ID: <dcc563d10904101120y49f00977nc74132e982518444@mail.gmail.com> (raw)
In-Reply-To: <49DC1034.1060705@frii.com>
References: <49DC1034.1060705@frii.com>
2009/4/7 Stuart McGraw <smcg2297@frii.com>:
> Hello all,
>
> I have a table with a primary key column
> that contains sequential numbers.
>
> Sometimes I need to shift them all up or down
> by a fixed amount. For example, if I have
> four rows with primary keys, 2, 3, 4, 5, I
> might want to shift them down by 1 by doing:
>
Generally speaking, when you need to do this more than once or twice
in the lifetime of your data, there's something wrong with your data
model.
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: scott.marlowe@gmail.com, smcg2297@frii.com
Subject: Re: changing multiple pk's in one update
In-Reply-To: <dcc563d10904101120y49f00977nc74132e982518444@mail.gmail.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