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

babelfish-for-postgresql / babelfish_extensions / 11468098887

22 Oct 2024 08:34PM UTC coverage: 74.513% (-0.02%) from 74.534%
11468098887

push

github

web-flow
Fix CONVERT function behavior for BINARY and VARBINARY types (#3007)

This change addresses inconsistencies in the CONVERT function's behavior when used with BINARY and VARBINARY types in Babelfish. Previously, Babelfish was not correctly handling style arguments and hexadecimal input for these conversions. With this change, the behavior now more closely aligns with SQL Server's implementation.

For CONVERT(BINARY(n), '0x...', 1), the function now correctly interprets the input string as hexadecimal values instead of ASCII characters, adhering to the specified style.

When NULL is provided as the style argument, the function now correctly returns NULL for both BINARY and VARBINARY types.

For both BINARY and VARBINARY conversions, the function now properly considers the style argument, ensuring consistent behavior across different styles.

Fixed an issue where style 2 was not being handled correctly, leading to unexpected results.

Issues Resolved
Task: BABEL-2736
Signed-off-by: Rahul Parande <rparande@amazon.com>

45219 of 60686 relevant lines covered (74.51%)

163113.99 hits per line

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

79.59
/contrib/babelfishpg_common/src/varbinary.c


Source Not Available

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