-
Notifications
You must be signed in to change notification settings - Fork 2
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf/5718~1
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/5718
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 3 commits
- 7 files changed
- 2 contributors
Commits on May 31, 2025
-
contrib/xml2: xslt_process() now reports XSLT-related error details
* It sets (and restores) the libxslt error handler (xsltSetGenericErrorFunc()). Since it only supports old-school "generic" error handlers, which are no longer used in PG's libxml code, we reintroduced a "generic" error handler xml_generic_error_handler() in xml.c. * The alternative would have been to expose PgXmlErrorContext in xml.h, so we could implement a generic handler in xslt_proc.c. This is obviously not desirable, as it would depend on USE_LIBXML. * No longer use the PG_XML_STRICTNESS_LEGACY for error handling, but query the error_occurred-flag via pg_xml_error_occurred(). The existance of this getter is another hint, that we are not supposed to expose PgXmlErrorContext in xml.h. * This change means that xslt_process() now reports not only details about XML parsing errors, but XSLT-schema deviations and missing stylesheet parameters as well. * The XSLT error messages now also contain line numbers. For that to work, we had to set a dummy "SQL" URL when parsing XML strings. This is important, since xsltPrintErrorContext() includes line numbers only if an URL is set. * The xsltSaveResultToString() error handling has been removed. It can practically only fail in OOM situations and there is no reason to handle them any different than with the other libxslt functions. * Updated test suite and added test case for detecting missing stylesheet parameters. This was initially reported here but has obviously been fixed in the meantime: https://www.postgresql.org/message-id/4C5ECEF9.3030806%40mlfowler.com
Robin Haberkorn authored and Commitfest Bot committedMay 31, 2025 Configuration menu - View commit details
-
Copy full SHA for 7bf93b7 - Browse repository at this point
Copy the full SHA 7bf93b7View commit details -
contrib/xml2: overloaded xslt_process() to provide variants for xmlty…
…pe and specifying parameters in arrays * There are apparently no functions that accept XML as text, except for xmlparse(). xslt_process() should therefore also accept xmltype. * A version accepting text is still kept for backwards compatibility, but is considered deprecated. * The new xmltype-based version expects an array of stylesheet parameter-value pairs, which is less limited than the now deprecated way of encoding all stylesheet parameters into a single text argument. We can now accept an arbitrary number of parameters and you can include `=` and `,` signs in both the key and value strings. Hstores haven't been used since they are in a module and we don't want to depend on any additional module. * The new implementation respects the database's encoding - text strings are always converted to UTF8 before passing them into libxml2. * On the downside, xml_parse() had to be made an external function. Since a declaration cannot be added to xml.h without drawing in libxml2 headers, the declaration is repeated in xslt_proc.c. Perhaps xml_parse() should be declared in a separate internal header? * xmlCtxtReadDoc() now sets a dummy "SQL" URL to preserve line numbers in XSLT stylesheet errors. This change at least does not break the test suite.
Robin Haberkorn authored and Commitfest Bot committedMay 31, 2025 Configuration menu - View commit details
-
Copy full SHA for 28440c2 - Browse repository at this point
Copy the full SHA 28440c2View commit details -
[CF 5718] v3 - contrib/xml2: xslt_process() should report XSLT-relate…
…d error details and accept xmltype This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/5718 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/D9PS2YM0OS8H.D27X2G7ZEQRS@b1-systems.de Author(s): Robin Haberkorn
Commitfest Bot committedMay 31, 2025 Configuration menu - View commit details
-
Copy full SHA for 5400f39 - Browse repository at this point
Copy the full SHA 5400f39View commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff cf/5718~1...cf/5718