Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
> We need to simulate the functionality of serial fields, because for
> various reasons we cannot use them.
>
> We have a field in a table that contains the number to be incremented -
> the serial (in fact we have a row in that table for each serial to be
> implemented) and we need to lock the row while the number is readed and
> updated.
>
> We thought to do it using 'select for update' but it seems not to work
> because other users can read the old value after the 'select for update'
> statement and before the commit.
First lock row: update serial_generator
set any_colon = any_colon
where row_id = ...
Regards,
Mirko Marovic
e-mail: mmarovic@eunet.yu
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.