I changed the logic of the trigger, I'm using before and taking the next_val
().
Thank you.
[]Laerson Keler
laerson.ke...@lkmc.com.br
Cel: 11 9914-4030
Res: 11 3404-4632
2011/10/17 Tom Lane t...@sss.pgh.pa.us
Laerson keler laerson.ke...@lkmc.com.br writes:
2011/10/17 Tom Lane
good idea. I will try.
Thank you.
[]Laerson Keler
laerson.ke...@lkmc.com.br
Cel: 11 9914-4030
Res: 11 3404-4632
2011/10/17 Jaime Casanova ja...@2ndquadrant.com
On Mon, Oct 17, 2011 at 2:43 PM, Tom Lane t...@sss.pgh.pa.us wrote:
There really is not any way to generate guaranteed-hole-free
The following bug has been logged online:
Bug reference: 6258
Logged by: Laerson Keler
Email address: laerson.ke...@lkmc.com.br
PostgreSQL version: 8.4.9
Operating system: Ubuntu 10.04 - Kernel 2.6.32-34
Description:Lock Sequence
Details:
Dear Srs, good morning, I
Laerson Keler laerson.ke...@lkmc.com.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
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
Laerson keler laerson.ke...@lkmc.com.br writes:
2011/10/17 Tom Lane t...@sss.pgh.pa.us
Laerson Keler laerson.ke...@lkmc.com.br writes:
Why did you do that, that is what were you trying to accomplish? It
never did block nextval() on the sequence, for example.
Tom Lane, good afternoon, I
On Mon, Oct 17, 2011 at 2:43 PM, Tom Lane t...@sss.pgh.pa.us wrote:
There really is not any way to generate guaranteed-hole-free sequences
using sequence objects. If you have to have that, I'd suggest locking
the table against other writes and then fetching MAX(id) + 1. It's not
very fast,