## George Weaver (gweaver@xxxxxxx): > 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