Skip site navigation (1) Skip section navigation (2)

Re: SERIAL error

From: mstory(at)uchicago(dot)edu
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SERIAL error
Date: 2004-11-28 05:24:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
My mistake, in the future i will consult the FAQ first, though i'm a bit
surprised i missed it in the documentation.  Much thanks for the help.  By
generic uses i guess i meant the uses one might have for creating a sequence as
an independant object in the database, and not the sequence in a table, and this
behavior surely would not frustrate that sort of use.  Many thanks.

Matthew Story

Quoting Michael Fuhr <mike(at)fuhr(dot)org>:

> On Sat, Nov 27, 2004 at 10:45:54PM -0600, mstory(at)uchicago(dot)edu wrote:
> > 
> > I'm using v. 7.4.2, and am encountering a problem with serial types.  On
> an
> > insert into a table that results in failure for any number of reasone
> (mostly
> > violation of contraints) I've found that the Sequence for the column of
> type
> > serial will still bump the value up once.
> This behavior is intentional.  See the PostgreSQL documentation and
> the FAQ:
> > Anyway, was wondering if this needed to be reported as a bug?  Seems
> > to cause problems for certain generic uses for the serial type.
> What do you mean by "generic uses"?  Sequences are for obtaining
> unique values; problems caused by assuming anything else are almost
> certainly application bugs.
> -- 
> Michael Fuhr
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend

In response to

pgsql-general by date

Next:From: Thomas F.O'ConnellDate: 2004-11-28 06:55:27
Subject: Re: (b)trim anomalies
Previous:From: Bruce MomjianDate: 2004-11-28 05:12:24
Subject: Re: AT TIME ZONE: "convert"?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group