Search Postgresql Archives

Re: Insert unique fails, still increments ID in a lookup table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




The problem is that the uniqueness check apparently increases the serial counter and hence I burn through the bigint IDs much faster. It's a waste for 100m+ records...

It's a little hidden but

http://www.postgresql.org/docs/current/static/functions-sequence.html

Per the last sentence, updates to the sequence are never rolled back - the insert is always going to increment the id regardless of whether it hits the exception or not.

--
Postgresql & php tutorials
http://www.designmagick.com/


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux