Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UDFh1-0008Qq-Cc for pgsql-bugs@arkaria.postgresql.org; Wed, 06 Mar 2013 14:51:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UDFh0-0004il-Nn for pgsql-bugs@arkaria.postgresql.org; Wed, 06 Mar 2013 14:51:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UDFgz-0004if-Tw for pgsql-bugs@postgresql.org; Wed, 06 Mar 2013 14:51:41 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UDFgu-00061N-6A for pgsql-bugs@postgresql.org; Wed, 06 Mar 2013 14:51:41 +0000 Received: from intern.anarazel.de (host90-152-0-50.ipv4.regusnet.com [90.152.0.50]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id B04644E8002; Wed, 6 Mar 2013 15:51:35 +0100 (CET) Date: Wed, 6 Mar 2013 15:51:36 +0100 From: Andres Freund To: Tom Lane Cc: maxim.boguk@gmail.com, pgsql-bugs@postgresql.org Subject: Re: BUG #7920: Sequence rename leave stale value for sequence_name Message-ID: <20130306145136.GB4970@alap2.anarazel.de> References: <20130306092101.GK13803@alap2.anarazel.de> <14588.1362580075@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <14588.1362580075@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) 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 On 2013-03-06 09:27:55 -0500, Tom Lane wrote: > 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. True. > > 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 only argument I see is reduced chance of people making errors. Code that actually uses sequence_name is broken. If we had something like columns that are computed on output, we could use that. What we could do is invent a new pseudo-column type like tableoid that renders as text.. In the end it doesn't seem worth bothering. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs