Re: PLEASE help ME , HOW TO GENERATE PRIMARY Keys on the fly

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: PLEASE help ME , HOW TO GENERATE PRIMARY Keys on the fly
Дата
Msg-id 20060526142254.GB5939@phlogiston.dyndns.org
обсуждение исходный текст
Ответ на Re: PLEASE help ME , HOW TO GENERATE PRIMARY Keys on the fly  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-sql
On Fri, May 26, 2006 at 09:08:20AM -0500, Bruno Wolff III wrote:
> 
> Rollbacks will not reset sequence values. Use setval to do that.

No, what I posted was the CREATE SEQUENCE after the BEGIN.  ROLLBACK
gets rid of the sequence.  The next time you create the same
sequence, therefore, it also starts at 1.

I don't actually know what this ranking is useful for, to be honest,
but people ask for it, and this is a stupid Postgres trick that can
make it happen.

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
The plural of anecdote is not data.    --Roger Brinner


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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: PLEASE help ME , HOW TO GENERATE PRIMARY Keys on the fly
Следующее
От: "Jesper K. Pedersen"
Дата:
Сообщение: Re: PLEASE help ME , HOW TO GENERATE PRIMARY Keys on the fly