Deprecating Heroku Postgres extension xml2
Change effective on 05 February 2024
We’re deprecating the xml2
PostgreSQL extension on all Heroku Postgres databases on March 8, 2024. The PostgreSQL project deprecated the xml2
extension in version 8.3 in February 2008. If you currently use the extension, you can use the built-in XML functions, the built-in xml type, and SQL/XML standards support instead. These functions are available on all Heroku Postgres databases.
If your app or database uses any of the following deprecated functions, you must update the app or database to use the built-in PostgreSQL XML functionality. If you don’t update your app or database, any queries, stored procedures, or PL/PGSQL using the deprecated functions will fail beginning on March 8, 2024. In addition, future database migrations and upgrades won’t complete, leaving the database in an unusable state.
Deprecated functions | Supported functions |
---|---|
xml_valid |
xml_is_well_formed |
xpath_string , xpath_number , xpath_bool |
xpath , possibly in combination with xpath functions: string() , number() , bool() |
xpath_nodeset |
xpath |
xpath_list |
xpath |
xpath_table |
xmltable |
If you don’t remove the extension by the deprecation date, Heroku will force-drop the extension. After migrating away from the deprecated functions, drop the xml2
extension from each database by running the command in a psql
session:
DROP EXTENSION xml2;
For more information on extensions, see Extensions, PostGIS, and Full Text Search Dictionaries on Heroku Postgres.