Re: serial column

From: Bob Pawley <rjpawley(at)shaw(dot)ca>
To: Ragnar <gnari(at)hive(dot)is>
Cc: Postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: serial column
Date: 2006-09-24 21:29:02
Message-ID: 006901c6e020$74a762e0$8e904618@owner
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Choice a.

I am using the numbers to identify devices.

If a device is deleted or replaced with another type of device I want the
numbering to still be sequential.

Bob

----- Original Message -----
From: "Ragnar" <gnari(at)hive(dot)is>
To: "Bob Pawley" <rjpawley(at)shaw(dot)ca>
Cc: "Postgresql" <pgsql-general(at)postgresql(dot)org>
Sent: Sunday, September 24, 2006 2:24 PM
Subject: Re: [GENERAL] serial column

> On sun, 2006-09-24 at 13:50 -0700, Bob Pawley wrote:
>> I need to develop a serial column that always starts at 1 and is
>> sequential even after deletes.
>
> what exactly do you mean?
>
> say you have rows where your
> columns has values 1,2,3 and 4.
>
> you now delete the row where
> the value is 2.
>
> what do you want to happen?
>
> a) the rows with values 3 and 4
> are changed tocontain 2 and 3 ?
>
> b) the next 2 values to be inserted
> to be 2 and then 5 ?
>
> c) something else ?
>
>
> gnari
>
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gevik Babakhani 2006-09-24 21:42:20 Re: serial column
Previous Message Ragnar 2006-09-24 21:24:17 Re: serial column