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

babelfish-for-postgresql / babelfish_extensions / 10197304316

01 Aug 2024 11:19AM UTC coverage: 73.535% (+0.005%) from 73.53%
10197304316

push

github

web-flow
Added wrapper functions for REPLACE() Function to fix issue with input containing multi-byte characters. (#2790)

Currently for string function REPLACE(), the existing definition takes input as type TEXT and return type is TEXT. This
leads to incorrect output for input containing multi-byte characters with NCHAR and NVARCHAR datatype for input, as
the return datatype should have been NVARCHAR for NCHAR and NVARCHAR datatype.

This commit will fix this issue by adding wrapper functions with correct input and return datatype for REPLACE()
function.

This commit also updates the castcontext of CAST from bbf_binary to varchar, to IMPLICIT which was previously
marked as ASSIGNMENT. Due to this REPLACE function call with input type binary was not able choose the available
replace definitions with argument datatype VARCHAR/NVARCHAR.

Task: BABEL-4836
Signed-off-by: Rohit Bhagat <rohitbgt@amazon.com>

13 of 14 new or added lines in 2 files covered. (92.86%)

454 existing lines in 5 files now uncovered.

42450 of 57728 relevant lines covered (73.53%)

110983.62 hits per line

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

96.28
/contrib/babelfishpg_common/src/typecode.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

© 2025 Coveralls, Inc