From: | Laerson keler <laerson(dot)keler(at)lkmc(dot)com(dot)br> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #6258: Lock Sequence |
Date: | 2011-10-17 18:03:54 |
Message-ID: | CAFk5V3O4NYQx+XQKVtmMdYY-U44oCEqBQG28tghjOGDMr-x8gQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Tom Lane, good afternoon, I block the sequence not to miss the sequel, for
it not to be skipped if the insert to fail. My logic involves two triggers,
one before and one after. I give the first one in last_value select for
update in the sequence and insert after I run a select next_val ('sequence')
to place in the next issue, so the sequence in my table is no failure.
Already grateful for the attention.
Thank you.
[]Laerson Keler
laerson(dot)keler(at)lkmc(dot)com(dot)br
Cel: 11 9914-4030
Res: 11 3404-4632
2011/10/17 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> "Laerson Keler" <laerson(dot)keler(at)lkmc(dot)com(dot)br> writes:
> > Dear Srs, good morning, I did the automatic update postgresql 8.4.9 and
> > a function stopped working, I used the option select for update
> > in a sequence and is now giving the following error "can not lock rows in
> > sequence ...", how can I enable the blocking of the sequence?
>
> Why did you do that, that is what were you trying to accomplish? It
> never did block nextval() on the sequence, for example.
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Euler Taveira de Oliveira | 2011-10-17 19:13:13 | Re: BUG #6258: Lock Sequence |
Previous Message | Tom Lane | 2011-10-17 15:52:48 | Re: BUG #6258: Lock Sequence |