How to handle "could not find function xml_is_well_formed" when restoring database in Version 17

George Weaver <gweaver@shaw.ca>

From: George Weaver <gweaver@shaw.ca>
To: "pgsql-general@postgresql.org" <pgsql-general@postgresql.org>
Date: 2024-10-01T17:08:58Z
Lists: pgsql-general
Good afternoon,

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:

    Remove xml2 <https://www.postgresql.org/docs/15/xml2.html>'s
    |xml_is_well_formed()| function (Tom Lane)

    This function has been implemented in the core backend since
    Postgres 9.1

How do I address this in restoring the backup to 17?

Thanks,

George