From: | George Weaver <gweaver(at)shaw(dot)ca> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to handle "could not find function xml_is_well_formed" when restoring database in Version 17 |
Date: | 2024-10-03 15:20:28 |
Message-ID: | a71c30b3-b3b2-49c3-82fa-56f5a1a253a5@shaw.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks Tom and Christoph,
Got it!
The function xml_valid is also gone. Does xml_is_well_formed accomplish
the same objective?
Thanks,
George
On 01/10/2024 12:28 p.m., Tom Lane wrote:
> George Weaver<gweaver(at)shaw(dot)ca> writes:
>> I am testing upgrading from Version 13 to Version 17. I am getting the
>> following error when trying to restore a database in Version 17 (the
>> database was backed up from Version 13 using the Version 17 pg_dump):
>> pg_Restore: error: could not execute query: ERROR: could not find
>> function "xml_is_well_formed" in file "C:/Program
>> Files/PostgreSQL/17/lib/pgxml.dll"
>> Command was: CREATE FUNCTION public.xml_is_well_formed(text) RETURNS
>> boolean
>> LANGUAGE c IMMUTABLE STRICT
>> AS '$libdir/pgxml', 'xml_is_well_formed';
> What you appear to have here is a pre-9.1 version of the xml2
> extension. That is so old that you're going to have difficulty
> modernizing it. We used to provide scripts for converting those
> loose objects into extensions, but we got rid of them in v13,
> figuring that after ten years their usefulness had passed.
>
> I think what you will have to do is manually drop all the xml2
> functions (look for pg_proc entries with '$libdir/pgxml' in probin)
> from the v13 database, then upgrade, then install the xml2 extension
> if you still want it. Fortunately that module only provided functions
> not datatypes, so this shouldn't be too painful. (Another way could
> be to manually remove those CREATE FUNCTION commands from the dump
> script.)
>
> I'm betting that this database has a lot of other deferred
> maintenance that you ought to think about while you're at it.
> If there are any other old-style extensions in there, better
> fix them up.
>
> regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2024-10-03 15:31:53 | Re: How to handle "could not find function xml_is_well_formed" when restoring database in Version 17 |
Previous Message | Vinícius Abrahão | 2024-10-03 11:29:50 | Re: Userland copy of pg_statistic - is there a solution? |