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-10-01 16:47:48
Message-ID: 200510011647.j91GlmC01395@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Hold, I think I see an idea here. We have two cases, those for SERIAL
> > and those for manual nextval() in DEFAULT. For SERIAL, we can easily
> > map to a nextval(::regclass) call on pg_dump reload. For manual
> > nextval, it will appear in the dump as nextval('myseq'::text), and Tom
> > is saying that will be late binding.
>
> > I think we can live with SERIAL working fine on reload, and requiring
> > users who created a manual default using nextval() to ALTER TABLE
> > DROP/SET DEFAULT to remove the ::text marker if they want early binding.
>
> "Removing the ::text marker" isn't going to work, because if we have
> both nextval(regclass) and nextval(text) then the latter is going to
> capture any cases with an unknown literal.

Why can't we hack up the precedence code to prefer regex for those
function oids?

--
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

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-10-01 16:49:43 Re: [PATCHES] Proposed patch for sequence-renaming problems
Previous Message Ron Peacetree 2005-10-01 16:38:55 Re: [HACKERS] A Better External Sort?