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

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

Build:
Build:
LAST BUILD BRANCH: 5577-5x
DEFAULT BRANCH: BABEL_5_X_DEV
Ran 03 Jul 2025 08:49AM UTC
Jobs 1
Files 120
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

03 Jul 2025 01:09AM UTC coverage: 75.79%. Remained the same
16045199987

push

github

web-flow
Fix for DATENAME() gives incorrect value with TZOFFSET part (#3895)

* Fix for DATENAME() gives incorrect value with TZOFFSET part (#3846)

Currently, DATENAME function returns a numeric value for TZOFFSET
datepart, which does not match SQL Server's text output.

Root cause: The function definition of sys.datename explicitly calls the
DATEPART function for most argument values, including TZOFFSET, thereby
returning a numerical offset value instead of the required text format
(+/-HH:MM).

Fix: Modified the sys function's SQL definition to extract and return
the timezone offset substring from the input - similar to how the
offset_string is determined in DATETRUNC/DATEBUCKET - if the argument
matches tzoffset. Furthermore, translated the function from SQL language
to plpgsql in order to enable raising an exception for unsupported input
datetime datatypes such as date, time, datetime and smalldatetime.

Task: BABEL-5846
Signed-off-by: Manisha Deshpande <mmdeshp@amazon.com>
(cherry picked from commit debf90bee)

* Fixed DATENAME to use datetimeoffset cast instead of sys.babelfish_conv_string_to_datetimeoffset

While sys.babelfish_conv_string_to_datetimeoffset is a helpful way to
validate datetimeoffset values before returning the offset string in
DATENAME(TZOFFSET,...) it is crrently not present in 4_X. (BABEL-4896).

Switching to a normal pg cast to datetimeoffset works as well, but does
not validate out of boundary offset hour values above +/-14:00 since PG
accepts upto hour 15.

The incorrect output in the out-of-boundary test case in
`datename+tzoffset-v-verify.sql` can be updated to the expected error
(SQL Server), once the root cause jira BABEL-5827 is fixed.

Task: BABEL-5846
Signed-off-by: Manisha Deshpande <mmdeshp@amazon.com>
(cherry picked from commit 3140b6ca6)

49271 of 65010 relevant lines covered (75.79%)

323536.16 hits per line

Jobs
ID Job ID Ran Files Coverage
1 16045199987.1 03 Jul 2025 08:49AM UTC 120
75.79
GitHub Action Run
Source Files on build 16045199987
  • Tree
  • List 120
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #16045199987
  • 5b8122d7 on github
  • Prev Build on BABEL_4_X_DEV (#16019497368)
  • Next Build on BABEL_4_7_STABLE (#16049465991)
  • 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