• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

babelfish-for-postgresql / babelfish_extensions / 26897627583

03 Jun 2026 04:13PM UTC coverage: 76.938% (+0.02%) from 76.921%
26897627583

push

github

web-flow
Add support for the method .query() for XML data type (#4786)

Currently, Babelfish supports .exist() and .value() XML methods but .query() was unsupported and threw an error.
With this change, .query(xpath) is now supported and returns XML results (for XPath 1.0 compatible queries).

The implementation follows the same 3-stage architecture like .exist() and .value():

ANTLR rewriting: @x.query('/path') is rewritten to sys.bbf_xmlquery('/path', @x)
Grammar: BBF_XMLQUERY is mapped in gram-tsql-rule.y
PL/pgSQL function sys.bbf_xmlquery(): validates the input type, checks QUOTED_IDENTIFIER, calls PostgreSQL's
xpath(), and returns the result as XML

Task: BABEL-5224
Signed-off-by: Japleen Kaur <amjj@amazon.com>

36 of 38 new or added lines in 3 files covered. (94.74%)

11 existing lines in 3 files now uncovered.

54355 of 70648 relevant lines covered (76.94%)

624748.62 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.41
/contrib/babelfishpg_tsql/src/tsqlUnsupportedFeatureHandler.cpp


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc