Skip site navigation (1) Skip section navigation (2)

Re: [PATCHES] Proposed patch for sequence-renaming problems

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [PATCHES] Proposed patch for sequence-renaming problems
Date: 2005-09-28 15:53:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Just to follow up, I agree we can't totally replace all instances of
> nextval() with regclass because regclass requires a constant string, but
> I would like to have the regclass behavior with simple syntax and
> require people who want "late binding" of the sequence name to use some
> extra syntax, like ::text or something.

That would require a considerably more invasive change, AFAICS: remove
the text-input version of nextval() and introduce an implicit coercion
from text to regclass to avoid breaking existing dumps.  I'd prefer not
to mess with that during beta, because there'd be nontrivial risk of
breaking existing behaviors.  Because the proposed patch just adds on
new functions and doesn't change the behavior of existing DEFAULT
clauses, I don't think it can break anything.

However, we could certainly add the NEXT VALUE FOR syntax if that will
satisfy your concern about syntax.

> The other question is whether we should be playing with this at all
> during beta.  Should we just disable ALTER SCHEMA RENAME and return to
> this during 8.2?  I am worried these side missions will delay our final
> release of 8.1.

I'm prepared to argue that this is a bug fix, not only for ALTER SCHEMA
RENAME but for some very long-standing problems with renaming of
sequences.  As I said before, you are seriously mistaken to consider
that disabling ALTER SCHEMA RENAME would eliminate the problem.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Ron PeacetreeDate: 2005-09-28 16:03:34
Subject: Re: [PERFORM] A Better External Sort?
Previous:From: Tom LaneDate: 2005-09-28 15:41:29
Subject: Re: enhanced pgbench

pgsql-patches by date

Next:From: Tom LaneDate: 2005-09-28 16:04:36
Subject: Re: Proposed patch for sequence-renaming problems
Previous:From: Bruce MomjianDate: 2005-09-28 15:35:26
Subject: Re: [PATCHES] Proposed patch for sequence-renaming problems

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group