Re: BUG #7920: Sequence rename leave stale value for sequence_name - Mailing list pgsql-bugs

From Maxim Boguk
Subject Re: BUG #7920: Sequence rename leave stale value for sequence_name
Date
Msg-id CAK-MWwShSTdReR9RzU9Lg4e+gnYEnR_Y0ERyPdeq0gJc_Qq_Rg@mail.gmail.com
Whole thread Raw
In response to Re: BUG #7920: Sequence rename leave stale value for sequence_name  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-bugs
>
> I don't find this particularly suprising. Nothing looks at that field in
> sequences, there imo is no point on having the name inside at all.
>
> Do you need that for some usecase or did you just happen to notice it?
>

> I personally don't see any way to nicely fix that. We can add code to
> also change the contents, but currently thats generic code. Or we could
> just remove the column in the next release?
>



Well, this story began with one very bad named sequence.
After database structure audit the developers were asked to rename this
sequence to something more appropriate.
And when they performed alter ... rename they found that the name still
same.
After that they came to me with questions.

Task is remove that very bad name from the production database altogether.
It seems that the easiest way is drop sequence and create new sequece.

+1 for "just remove the column in the next release"


--=20
Maxim Boguk
Senior Postgresql DBA
http://www.postgresql-consulting.ru/ <http://www.postgresql-consulting.com/=
>

Phone RU: +7 910 405 4718
Phone AU: +61 45 218 5678

Skype: maxim.boguk
Jabber: maxim.boguk@gmail.com
=D0=9C=D0=BE=D0=B9=D0=9A=D1=80=D1=83=D0=B3: http://mboguk.moikrug.ru/

"People problems are solved with people.
If people cannot solve the problem, try technology.
People will then wish they'd listened at the first stage."

pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: BUG #7920: Sequence rename leave stale value for sequence_name
Next
From: Tom Lane
Date:
Subject: Re: BUG #7920: Sequence rename leave stale value for sequence_name