Re: ALTER SEQUENCE

Поиск
Список
Период
Сортировка
От Don Y
Тема Re: ALTER SEQUENCE
Дата
Msg-id 446B9D10.3020000@DakotaCom.Net
обсуждение исходный текст
Ответ на Re: ALTER SEQUENCE  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: ALTER SEQUENCE  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: ALTER SEQUENCE  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-general
Bruce Momjian wrote:
> Don Y wrote:
>> Bruce Momjian wrote:
>>> Don Y wrote:
>>>> Hi,
>>>>
>>>> It doesn't appear that there is a way to rename a sequence
>>>> (ideally with a "cascade" action).
>>>
>>> Uh, the ALTER SEQUENCE manual page says:
>> Uh, the 8.0.3 man page for ALTER SEQUENCE makes no mention of this.
>> Nor does "\h ALTER SEQUENCE" in psql yield any pointers.
>>
>>>        Some variants of ALTER TABLE can be used with sequences as
>>>        well; for example, to rename a sequence  use  ALTER  TABLE
>>>        RENAME.
>>>
>>> Does that help?
>> Sure!  It appears to allow both the rename and change of ownership.
>> Thanks!
>
> I see the documentation mention added August 1, 2005 byt Tom Lane.

Date tag on the bottom of my man pages is "2005-01-17" -- so that
explains *that*!  :>

In general, how safe is it to use "current" man pages (to
sidestep these sorts of issues)?  Obviously, there will be
things in the newer pages that reflect changes NOT present
in older versions... but, will the documentation updates
(i.e. this a prime example) outweigh the confusion added
by documentation for not-yet-existent features/fixes/etc.?)

>> Obviously, the documentation doesn't agree with the code  :-(
>>
>> But, it still leaves unanswered the question of the risk involved
>> in just changing the name/owner in the system tables...
>
> It is best to use ALTER.  The only other sure-safe way to do it is to
> look at the ALTER code and do the same things with the system tables.
> However, in most cases a system table modification works fine, but I
> don't recommend it for production servers.

One would *hope* that there was no redundant "information"
in the tables... but, realistically, that may not be the
case (efficiency hacks, etc.)

For *this* problem, an obvious solution exists.  And, even
if it didn't, dropping the sequence, recreating it and
reinitializing it wouldn't be that painful.  I'm just
wondering how aggressive I should be in "tinkering"... :-(

Thanks!
--don

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

Предыдущее
От: Emi Lu
Дата:
Сообщение: Re: RES: Add column and specify the column position in
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: FATAL: could not read statistics message