From: | Christoph Moench-Tegeder <cmt(at)burggraben(dot)net> |
---|---|
To: | George Weaver <gweaver(at)shaw(dot)ca> |
Cc: | "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-01 17:25:54 |
Message-ID: | Zvwwoj5gC84ncFpL@elch.exwg.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
## George Weaver (gweaver(at)shaw(dot)ca):
> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-10-01 17:28:43 | Re: How to handle "could not find function xml_is_well_formed" when restoring database in Version 17 |
Previous Message | George Weaver | 2024-10-01 17:08:58 | How to handle "could not find function xml_is_well_formed" when restoring database in Version 17 |