Re: Remove implicit unique index creation on SERIAL columns? - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Remove implicit unique index creation on SERIAL columns?
Date
Msg-id 200208200317.g7K3Htp19255@candle.pha.pa.us
Whole thread Raw
In response to Re: Remove implicit unique index creation on SERIAL columns?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-hackers
Stephan Szabo wrote:
> > If don't understand.  We already have a unique index on the SERIAL
> > column, so why bother rejecting an insert/update that supplies the
> > value?  We need the column to be unique, and that is forced, but why
> > prevent _any_ unique value from being used.
> 
> One reason is that the sequence won't respect those inserted values and
> you'll get uniqueness errors on statements that don't give a value for the
> column where you'd expect to be getting a working autogenerated value.

Oh, it causes problems later on.  Interesting.  However, preventing
INSERT/UPDATE seems quite extreme.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Justin Clift
Date:
Subject: Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in