database_cleaner-active_record icon indicating copy to clipboard operation
database_cleaner-active_record copied to clipboard

For PG truncate, fetch last_value from sequence

Open cwjenkins opened this issue 9 months ago • 0 comments

With HEAD, receiving ERROR: currval of sequence ... given currval isn't defined until nextval is invoked 'per session'. https://www.postgresql.org/docs/current/functions-sequence.html

Therefore looking up what's been persisted whether it was atomically incremented via nextval or manual shifted by something else.

cwjenkins avatar May 02 '24 20:05 cwjenkins