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

babelfish-for-postgresql / babelfish_extensions / 13928900957
76%
BABEL_5_X_DEV: 77%

Build:
Build:
LAST BUILD BRANCH: 5577-5x
DEFAULT BRANCH: BABEL_5_X_DEV
Ran 18 Mar 2025 05:22PM UTC
Jobs 1
Files 115
Run time 1min
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

18 Mar 2025 04:51PM UTC coverage: 74.942% (+0.001%) from 74.941%
13928900957

push

github

web-flow
Select "for json" output contains Backsla- Resolve improper oid handling (#3581)

FOR JSON is a SQL clause that formats query results as JSON. Normally, it escapes quotes in strings to ensure valid JSON output. However, there's a special case we need to handle: when the input string is already the output of a JSON function, we want to avoid this escaping.

In this PR, we're addressing this issue. Here are the key changes we've made:

We've introduced a new domain type called 'nvarchar_json'. This allows us to differentiate between regular string output and output from JSON functions.

We've updated the return type of the JSON_QUERY system function from NVARCHAR to NVARCHAR_JSON. This change helps identify when a string is already in JSON format.

We've modified how FOR JSON handles input from JSON_QUERY. Specifically, we're now providing a JSONOID for these inputs, which signals that they should be treated differently from regular strings.

These changes allow FOR JSON to recognize when a string is already in JSON format (coming from a JSON function like JSON_QUERY), and avoid unnecessary escaping in these cases. This results in more accurate and efficient JSON output when working with nested JSON structures

During the implementation we found out more existing issues( to be handle in future) with escaping-

Nested FOR JSON + JSON FUNCS case
FOR JSON + JSON_MODIFY
FOR JSON AUTO doesn't work properly for all cases

Issues Resolved: BABEL-5112
Signed-off-by: Herambh Shah <herambhs@amazon.com>

7 of 7 new or added lines in 1 file covered. (100.0%)

47373 of 63213 relevant lines covered (74.94%)

193192.59 hits per line

Jobs
ID Job ID Ran Files Coverage
1 13928900957.1 18 Mar 2025 05:22PM UTC 115
74.94
GitHub Action Run
Source Files on build 13928900957
  • Tree
  • List 115
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #13928900957
  • 889d55b3 on github
  • Prev Build on BABEL_4_X_DEV (#13927451111)
  • Next Build on BABEL_4_X_DEV (#13929105451)
  • 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