Without seeing the SQL statements you executed in the session it is
difficult to see your problem.
Getting a current sequence after a rollback is no problem (in 8.0
anyway). Please note though, the sequence itself is NOT rolled back.
This is correct behaviour. Currval will return the last sequence
retrieved for the session (using nextval), even if other sessions have
accessed the sequence in the intervening time.
Eddy
Assad Jarrahian wrote:
>Hi all,
> So I started to make some changes with my code here and there
>(nothing to do with the relevant lines) and suddenly currval and
>rollback don't work.
>
>
>
>
<snip content="code"/>
>What happens is that the it inserts a db, but cannot get a value back
>using currval (ERROR: ERROR: currval of sequence "lm_id_seq" is not
>yet defined in this session 55000 ) , yet the db gets the addlm
>inserted.
>
>
>Shouldn't it rollback?
>Furthermore, why would currval suddenly stop working?
>
>Much thanks for your feedback in advance.
>
>-assad
>
>