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

babelfish-for-postgresql / babelfish_extensions / 26432527550
77%
BABEL_6_X_DEV: 77%

Build:
Build:
LAST BUILD BRANCH: SELECT-COUNT(-)-AS-matches
DEFAULT BRANCH: BABEL_6_X_DEV
Ran 26 May 2026 05:16AM UTC
Jobs 1
Files 127
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 May 2026 04:36AM UTC coverage: 77.166% (+0.05%) from 77.114%
26432527550

push

github

web-flow
Add support for FOR XML AUTO mode (#4688)

This commit adds support for FOR XML AUTO query. With this change, AUTO mode generates hierarchical XML
where element names and nesting are derived from the table aliases in the SELECT. This commit also supports all
existing directives (ELEMENTS, XSINIL, ROOT) and works with JOINs, CTEs, subqueries, functions, and views.

Implementation summary:

- For each entry in the SELECT target list, parser-side rewrite captures (nest_level, table_alias, col_name) and threads this metadata as a 9th text argument to both FOR XML aggregates (tsql_select_for_xml_agg, tsql_select_for_xml_text_agg). The metadata string is a comma-separated list of "level.table_alias.col_name" entries, e.g. "1.c.CustomerID,1.c.Name,2.o.OrderID,2.o.Amount" for a query joining customer (alias c) and order (alias o).

- Hierarchy is built row-by-row by the aggregate state function. It tracks last-seen values per column and finds
the first column whose value differs from the previous row - that column's nest_level becomes the "first changed
level". The aggregate closes any open elements deeper than that level and opens new elements for every level
from that point down. Sibling rows that share their parent's value get merged under the same parent element.

- Performance: since column types don't change between rows, type output functions (FmgrInfo) and T-SQL
datatype-detection results are cached on the first row to skip catalog (syscache) lookups on every subsequent
value.

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

538 of 618 new or added lines in 3 files covered. (87.06%)

3 existing lines in 2 files now uncovered.

54217 of 70260 relevant lines covered (77.17%)

400363.23 hits per line

Uncovered Changes

Lines Coverage ∆ File
50
89.58
-4.84% contrib/babelfishpg_tsql/src/tsql_for/forxml.c
30
90.39
-0.49% contrib/babelfishpg_tsql/src/pl_handler.c

Coverage Regressions

Lines Coverage ∆ File
2
89.58
-4.84% contrib/babelfishpg_tsql/src/tsql_for/forxml.c
1
90.39
-0.49% contrib/babelfishpg_tsql/src/pl_handler.c
Jobs
ID Job ID Ran Files Coverage
1 26432527550.1 26 May 2026 05:16AM UTC 127
77.17
GitHub Action Run
Source Files on build 26432527550
  • Tree
  • List 127
  • Changed 4
  • Source Changed 4
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26432527550
  • 8089e2f0 on github
  • Prev Build on BABEL_5_X_DEV (#26025517731)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc