From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | maxim(dot)boguk(at)gmail(dot)com, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #7920: Sequence rename leave stale value for sequence_name |
Date: | 2013-03-06 14:27:55 |
Message-ID: | 14588.1362580075@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> 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.
Yeah, and we really can't update the name there because there is no
provision for transactional updates of sequence tuples.
> 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?
This has been discussed before, and the general opinion has been to
leave things alone until we get around to doing a wholesale refactoring
of sequence support. There has been talk for example of merging all
sequences into one catalog, instead of the current very wasteful
technique of having a whole relation to store (in essence) one counter.
That would probably break existing code that tries to select from a
sequence, but at least there would be objective benefits from it.
Removing the sequence_name column alone would also break existing code,
for ... um ... not much.
The correct answer is for applications to not rely on the sequence_name
column. It's been of dubious usefulness ever since we invented schemas,
anyhow.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2013-03-06 14:51:36 | Re: BUG #7920: Sequence rename leave stale value for sequence_name |
Previous Message | Maxim Boguk | 2013-03-06 09:55:22 | Re: BUG #7920: Sequence rename leave stale value for sequence_name |