Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UDFK7-0006b8-5g for pgsql-bugs@arkaria.postgresql.org; Wed, 06 Mar 2013 14:28:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UDFK6-0000kc-Lr for pgsql-bugs@arkaria.postgresql.org; Wed, 06 Mar 2013 14:28:02 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UDFK5-0000ju-Nr for pgsql-bugs@postgresql.org; Wed, 06 Mar 2013 14:28:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UDFK4-0004uz-C2 for pgsql-bugs@postgresql.org; Wed, 06 Mar 2013 14:28:01 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r26ERuS8014589; Wed, 6 Mar 2013 09:27:56 -0500 (EST) From: Tom Lane To: Andres Freund cc: maxim.boguk@gmail.com, pgsql-bugs@postgresql.org Subject: Re: BUG #7920: Sequence rename leave stale value for sequence_name In-reply-to: <20130306092101.GK13803@alap2.anarazel.de> References: <20130306092101.GK13803@alap2.anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 06 Mar 2013 10:21:01 +0100" Date: Wed, 06 Mar 2013 09:27:55 -0500 Message-ID: <14588.1362580075@sss.pgh.pa.us> X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Andres Freund 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs