Re: OPAQUE and 7.2-7.3 upgrade - Mailing list pgsql-hackers

From Oliver Elphick
Subject Re: OPAQUE and 7.2-7.3 upgrade
Date
Msg-id 1031850517.18149.15.camel@linda
Whole thread Raw
In response to Re: OPAQUE and 7.2-7.3 upgrade  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: OPAQUE and 7.2-7.3 upgrade
List pgsql-hackers
On Thu, 2002-09-12 at 15:54, Tom Lane wrote:
> Oliver Elphick <olly@lfix.co.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.Elphick@lfix.co.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;
andlet him return unto the LORD,      and He will have mercy upon him; and to our God, for      he will abundantly
pardon."         Isaiah 55:7 
 



pgsql-hackers by date:

Previous
From: Mike Mascari
Date:
Subject: Re: PGXLOG variable worthwhile?
Next
From: "scott.marlowe"
Date:
Subject: Re: DROP COLUMN misbehaviour with multiple inheritance