public inbox for [email protected]
help / color / mirror / Atom feedFrom: George Weaver <[email protected]>
To: [email protected] <[email protected]>
Subject: Re: How to handle "could not find function xml_is_well_formed" when restoring database in Version 17
Date: Thu, 3 Oct 2024 10:20:28 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
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<[email protected]> 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
view thread (5+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: How to handle "could not find function xml_is_well_formed" when restoring database in Version 17
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox