Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.12 migration tips #110

Open
hmaarrfk opened this issue Jan 6, 2024 · 0 comments
Open

2.12 migration tips #110

hmaarrfk opened this issue Jan 6, 2024 · 0 comments
Labels

Comments

@hmaarrfk
Copy link
Contributor

hmaarrfk commented Jan 6, 2024

Just leaving this here, I've seen many feedstocks get hung up on the error handler not being declared const.

diff -ur a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c
--- a/src/backend/utils/adt/xml.c	2023-11-06 17:04:27.000000000 -0500
+++ b/src/backend/utils/adt/xml.c	2023-12-03 21:01:12.452541626 -0500
@@ -123,7 +123,7 @@
 										   xmlParserCtxtPtr ctxt);
 static void xml_errsave(Node *escontext, PgXmlErrorContext *errcxt,
 						int sqlcode, const char *msg);
-static void xml_errorHandler(void *data, xmlErrorPtr error);
+static void xml_errorHandler(void *data, const xmlError *error);
 static int	errdetail_for_xml_code(int code);
 static void chopStringInfoNewlines(StringInfo str);
 static void appendStringInfoLineSeparator(StringInfo str);
@@ -2002,7 +2002,7 @@
  * Error handler for libxml errors and warnings
  */
 static void
-xml_errorHandler(void *data, xmlErrorPtr error)
+xml_errorHandler(void *data, const xmlError *error)
 {
 	PgXmlErrorContext *xmlerrcxt = (PgXmlErrorContext *) data;
 	xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) error->ctxt;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant