Re: [GENERAL] Sequences/defaults and pg_dump

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] Sequences/defaults and pg_dump
Дата
Msg-id 4412.1139516639@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [GENERAL] Sequences/defaults and pg_dump  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Tom Lane wrote:
>> The only thing we'd lose is that dropping a column
>> originally declared as serial wouldn't implicitly drop the sequence.

> Wasn't that the primary purpose that the main coder for dependencies did
> the work for?

My recollection is that the dependency for serials was added as an
afterthought without too much consideration of the long-term
implications.  It was a cheap way of sort-of solving an immediate
problem using a mechanism that we were putting in place anyway.
But what we've got now is a misbegotten cross between the theory that
a SERIAL is a unitary object you mustn't muck with the innards of,
and the theory that SERIAL is just a macro that sets up an initial
state you can ALTER to your heart's content later.

IMHO we should make a choice between those plans and stick to it,
not add more and more infrastructure to let you ALTER things you
shouldn't be altering.  Either a SERIAL is a black box or it isn't.
If it is not to be a black box, we need to reduce rather than increase
the amount of hidden semantics.
        regards, tom lane


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

Предыдущее
От: "Mark Woodward"
Дата:
Сообщение: Re: PostgreSQL 8.0.6 crash
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Server Programming in C: palloc() and pfree()