Marcin Inkielman wrote:
>
> On Fri, 12 Nov 1999, Vadim Mikheev wrote:
>
> > > LOCK <<tablename>> IN ACCESS EXCLUSIVE MODE;
> > ^^^^^^
> > This blocks concurrent read access - is it what you really want?
> >
> I know it is rather restrictive but when applied to a sequence it inhibits
> to a unterminated transaction to change sequence current value (with
> for example SELECT nextval('seq')) - ROLLBACK doesn't revert
> previous sequence curr. value.
How do I lock a sequence?
I must be able to rollback to previous sequence curr.value, if the
transaction fails to work.
I have been looking this for ages, it seems I haven't found the answer
yet.
Regards,
Chai