public inbox for [email protected]
help / color / mirror / Atom feedFrom: Christoph Moench-Tegeder <[email protected]>
To: George Weaver <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: How to handle "could not find function xml_is_well_formed" when restoring database in Version 17
Date: Tue, 1 Oct 2024 19:25:54 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
## George Weaver ([email protected]):
> 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';
>
> The only reference I can find to xml_is_well_formed in the Release
> Notes (Version 15) is:
That's it.
Your best option is to get rid of that module in the "old"
(PostgreSQL 13) database - maybe cou can just drop the extension
outright (because it's not really used anyways), maybe you need
to fix you code to use the new API. The minimalist workaround
would be to exclude function public.xml_is_well_formed() from
the backup (either at backup or at restore time) and point
your code to pg_catalog.xml_is_well_formed().
The fact that you are seeing that CREATE FUNCTION and not only
a CREATE EXTENSION would indicate that the function was created
manually and not as part of the extension (but pgxml.so would
match the extension) - or this is a left-over from pre-extension
days (CREATE EXTENSION was added in 9.1, so...)
I'd strongly advise to clean up the old database (if required
migrate away from the xml2 extension/functions and drop the
extensions and any manually created function referencing it),
it will safe you a lot of headache later on.
Regards,
Christoph
--
Spare Space
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], [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