Skip to content

Add XMLPARSE expression - #2371

Open
LucaCappelletti94 wants to merge 4 commits into
apache:mainfrom
LucaCappelletti94:xmlparse
Open

Add XMLPARSE expression#2371
LucaCappelletti94 wants to merge 4 commits into
apache:mainfrom
LucaCappelletti94:xmlparse

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

PostgreSQL supports XMLPARSE(CONTENT expr) and XMLPARSE(DOCUMENT expr), which cannot be represented as a plain function call because of the leading CONTENT or DOCUMENT mode keyword. This follows how the parser already models other keyword-syntax functions such as EXTRACT(field FROM expr), adding an XmlParse expression with an XmlParseMode of CONTENT or DOCUMENT. It is parsed for dialects that return true from supports_xml_expressions(), namely PostgreSQL and Generic, and on every other dialect xmlparse keeps parsing as an ordinary function.

Part of the work to support PostgreSQL XML functions (split from #2252, follows #2299 and #2368).

Comment thread src/ast/mod.rs Outdated
@LucaCappelletti94
LucaCappelletti94 force-pushed the xmlparse branch 2 times, most recently from af4e572 to f9b311e Compare July 30, 2026 14:45
@LucaCappelletti94
LucaCappelletti94 requested a review from iffyio July 30, 2026 18:45
Comment thread src/ast/mod.rs
Comment thread src/parser/mod.rs Outdated
Comment thread src/parser/mod.rs Outdated

@iffyio iffyio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @LucaCappelletti94!

@iffyio
iffyio added this pull request to the merge queue Aug 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Aug 19, 2026
@LucaCappelletti94

Copy link
Copy Markdown
Contributor Author

I think there are some CI issues on github at this time and it bounced the merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants