pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: maxim.boguk@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7920: Sequence rename leave stale value for sequence_name
Date: Wed, 6 Mar 2013 15:51:36 +0100
Message-ID: <20130306145136.GB4970@alap2.anarazel.de> (raw)
In-Reply-To: <14588.1362580075@sss.pgh.pa.us>
References: <E1UDARB-0007MF-SE@wrigleys.postgresql.org>
	<20130306092101.GK13803@alap2.anarazel.de>
	<14588.1362580075@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 2013-03-06 09:27:55 -0500, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.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.

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



view thread (6+ messages)  latest in thread

Message-ID: <20130306145136.GB4970@alap2.anarazel.de>
Permalink:  ../20130306145136.GB4970@alap2.anarazel.de/
Also on:    postgresql.org/message-id/20130306145136.GB4970@alap2.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andres@2ndquadrant.com, tgl@sss.pgh.pa.us, maxim.boguk@gmail.com
  Subject: Re: BUG #7920: Sequence rename leave stale value for sequence_name
  In-Reply-To: <20130306145136.GB4970@alap2.anarazel.de>
  References: <E1UDARB-0007MF-SE@wrigleys.postgresql.org> <20130306092101.GK13803@alap2.anarazel.de> <14588.1362580075@sss.pgh.pa.us> <20130306145136.GB4970@alap2.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox