Repository navigation
feat(postgres): add SQL/XML standard expressions - #41
Merged
Merged
Conversation
Wire PostgreSQL XMLPARSE support through the core SQL/XML expression protocol and remove the old PostgreSQL-specific function factory. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Enable PostgreSQL SQL/XML capabilities through core expression protocols, keep PostgreSQL-specific XPath helpers separate, and add self-contained examples that exercise expression-generated SQL. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/v1.0.0.dev15 #41 +/- ##
========================================================
+ Coverage 71.08% 71.09% +0.01%
========================================================
Files 232 232
Lines 10272 10269 -3
Branches 1621 1617 -4
========================================================
- Hits 7302 7301 -1
+ Misses 2442 2441 -1
+ Partials 528 527 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
7 of 12 tasks
vistart
added a commit
that referenced
this pull request
Jun 15, 2026
* feat(postgres): use core SQL/XML XMLPARSE expression Wire PostgreSQL XMLPARSE support through the core SQL/XML expression protocol and remove the old PostgreSQL-specific function factory. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * feat(postgres): add SQL/XML standard expression support Enable PostgreSQL SQL/XML capabilities through core expression protocols, keep PostgreSQL-specific XPath helpers separate, and add self-contained examples that exercise expression-generated SQL. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore: add changelog fragment for PR #41 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Adds PostgreSQL support for core SQL/XML standard expression constructors.
This PR updates the PostgreSQL dialect to opt into supported SQL/XML standard capabilities from core, including:
XMLPARSEandXMLSERIALIZEXMLELEMENT,XMLATTRIBUTES,XMLFOREST,XMLCONCAT,XMLCOMMENT,XMLPI, andXMLROOTXMLAGGXMLEXISTSandXMLTABLEcapability declarations where supported by PostgreSQLIt also keeps PostgreSQL-specific XPath and XML well-formed helpers separate from the standard SQL/XML expression API, and removes SQL/XML constructors from the plain function capability map so they are not advertised as ordinary SQL functions.
A self-contained SQL/XML examples module is included under the PostgreSQL examples package. The example uses environment-based connection configuration, XML fixture files, and expression-generated DDL/DML/query SQL.
Adds #
Type of change
feat: A new featuretest: Adding missing tests or correcting existing tests (for the new feature)docs: Documentation only changes (if related to the new feature)Breaking Change
Applicable
rhosocial-activerecordVersion Range:Compatible with the corresponding core SQL/XML expression support introduced for
rhosocial-activerecord1.0.0.dev28.Related Repositories/Packages
Requires the core SQL/XML expression support from
python-activerecordPR #98.Related backend follow-up changes exist for Oracle, SQL Server, MySQL, MariaDB, and Firebird to align each backend's SQL/XML support boundary with the core standard expression protocols.
Testing
Test Plan:
Local full test run was skipped during PR preparation by user choice.
Previously run targeted tests:
source .venv3.8/bin/activate pytest tests/rhosocial/activerecord_postgres_test/feature/backend/postgres/test_xml_types.py \ tests/rhosocial/activerecord_postgres_test/feature/backend/postgres/test_xml_integration.py \ tests/rhosocial/activerecord_postgres_test/feature/backend/test_dialect_function_support.py \ tests/rhosocial/activerecord_postgres_test/feature/backend/test_postgres_protocol_conformance.pySQL/XML example validation:
source .venv3.8/bin/activate python -m py_compile src/rhosocial/activerecord/backend/impl/postgres/examples/sqlxml/standard_expressions.py python src/rhosocial/activerecord/backend/impl/postgres/examples/sqlxml/standard_expressions.py python src/rhosocial/activerecord/backend/impl/postgres/examples/sqlxml/standard_expressions.py --executeThe execute mode was verified against all configured PostgreSQL scenarios from 9 through 18.
Checklist
changelog.d/<issue_number>.<type>.md).Additional Notes
XMLQUERYis intentionally not declared as supported by PostgreSQL. PostgreSQL-specific XML helpers such as XPath functions remain backend-specific APIs instead of being conflated with SQL/XML standard constructors.