Re: Review: rollback sequence reset for TRUNCATE ... RESTART IDENTITY

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Review: rollback sequence reset for TRUNCATE ... RESTART IDENTITY
Дата
Msg-id 24101.1290029046@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Review: rollback sequence reset for TRUNCATE ... RESTART IDENTITY  (Steve Singer <ssinger@ca.afilias.info>)
Список pgsql-hackers
Steve Singer <ssinger@ca.afilias.info> writes:
> I will look at addressing this in an updated patch.

I've nearly finished revising the patch already, don't worry about it.

>> Should currval really be used after a failed transaction ? Right now, we can
>> have a value that has been generated inside a rollbacked transaction too. I'd
>> vote for leave it alone.

> I agree  probably shouldn't be using curval after a failed transaction 

Well, people can do that now, and it doesn't throw an error.  I'm
inclined to agree with Marc that just leaving it alone (ie, it returns
the last value produced, whether the transaction rolls back or not)
is the best thing.  There's inherently going to be some inconsistency
here, since there's no such thing as a transactional sequence change
otherwise.  I don't see the point of going way out of our way to move
the inconsistencies around.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Steve Crawford
Дата:
Сообщение: Re: unlogged tables
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: unlogged tables