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

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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(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-29 02:41:12
Message-ID: 200509290241.j8T2fCg14650@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Also, why is the nextval ::text casting output by pg_dump anyway?

---------------------------------------------------------------------------

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > I am thinking we should hard-code something in the backend so if the
> > function oid is nextval/currval/setval, we strip off any text casting
> > internally.
> 
> NO.  No bloody way ... that is far dirtier than any other proposal
> that's been made in this thread.  I don't even want to think about
> what strange corner-case semantics that might create.
> 
> >> So on the whole I like leaving nextval() as-is and introducing a
> >> separate function next_value(regclass).
> 
> > I disagree.  nextval() is too embedded in people's thinking to make them
> > change
> 
> Why?  And what's your evidence for this?  You could equally well argue
> that the fact that nextval takes a text argument is too embedded to
> change.
> 
> > when we have the ability to have it do the _right_ _thing_,
> 
> We have no ability to make it do what you think is the right thing,
> at least not without introducing kluges that are certain to come back
> to haunt us.
> 
> 			regards, tom lane
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-hackers by date

Next:From: Gavin SherryDate: 2005-09-29 02:48:21
Subject: Re: Proposed patch for sequence-renaming problems
Previous:From: Bruce MomjianDate: 2005-09-29 02:37:45
Subject: Re: [PATCHES] Proposed patch for sequence-renaming problems

pgsql-patches by date

Next:From: Gavin SherryDate: 2005-09-29 02:48:21
Subject: Re: Proposed patch for sequence-renaming problems
Previous:From: Bruce MomjianDate: 2005-09-29 02:37:45
Subject: Re: [PATCHES] Proposed patch for sequence-renaming problems

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