Re: OPAQUE and 7.2-7.3 upgrade

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Dave Page <dpage(at)vale-housing(dot)co(dot)uk>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: OPAQUE and 7.2-7.3 upgrade
Date: 2002-09-12 17:08:37
Message-ID: 1031850517.18149.15.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2002-09-12 at 15:54, Tom Lane wrote:
> Oliver Elphick <olly(at)lfix(dot)co(dot)uk> writes:
> > On Thu, 2002-09-12 at 15:31, Tom Lane wrote:
> >> Does anyone see a cleaner answer than re-allowing OPAQUE for PL
> >> handlers?
>
> > Can't you just special case the language handlers when dumping <7.3 and
> > change 'RETURNS opaque' to 'RETURNS language_handler'? That's all that
> > is needed to let them be restored OK into 7.3.
>
> Only if people dump their old databases with 7.3 pg_dump; which is an
> assumption I'd rather not make if we can avoid it.

I don't understand.

The only pg_dump we can fix is 7.3. You can't backport such a change
into 7.2 or it won't work for 7.2 restore. If you are using 7.3 pg_dump
it isn't an assumption but a certainty that it is being used.

If someone restores into 7.3 with a 7.2 dump they are going to have
other problems, such as turning all their functions private. Since they
are going to need to edit the dump anyway, they might as well edit this
bit too. Surely we should be advising them to use 7.3's pg_dump to do
the upgrade.

The alternative approach is to build a set of kludges into >=7.3 to
change opague to language_handler when a language function is
installed. That doesn't sound like a good idea.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Let the wicked forsake his way, and the unrighteous
man his thoughts; and let him return unto the LORD,
and He will have mercy upon him; and to our God, for
he will abundantly pardon." Isaiah 55:7

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Swan 2002-09-12 17:19:13 Re: OPAQUE and 7.2-7.3 upgrade
Previous Message scott.marlowe 2002-09-12 17:07:10 Re: DROP COLUMN misbehaviour with multiple inheritance