Search Postgresql Archives

Re: Continue sequence

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

 



On Fri, Jan 05, 2007 at 09:30:46 -0800,
  Wilton Wonrath <wrwonrath@xxxxxxxxxxxx> wrote:
> 
> I think that I will need to use LOCK TABLE or SELECT FOR UPDATE, but in 
> both cases if the client terminal shutdown suddenly the tuple/table 
> stays locked on the server for a indeterminate time.

You need to use LOCK TABLE to block other sessions from concurrently inserting
the same item.

What is the purpose of the number column that requires there to be no gaps
for a particular serie? If they could just be unique, you could use a single
sequence for the table and you wouldn't have to do locking.


[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