Oliver Elphick wrote:
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.

  
Is it possible to build a standalone 7.3 dump/dump_all program that can be run on a server with an existing 7.2.x installation and not be linked against 7.3 libraries?   Call it a migration agent if you will.

A notice of somekind would help:   Before upgrading, dump the database using this program.