Updated escape logic in quotename#3857
Merged
forestkeeper merged 1 commit intobabelfish-for-postgresql:BABEL_4_X_DEVfrom Jun 23, 2025
Merged
Updated escape logic in quotename#3857forestkeeper merged 1 commit intobabelfish-for-postgresql:BABEL_4_X_DEVfrom
forestkeeper merged 1 commit intobabelfish-for-postgresql:BABEL_4_X_DEVfrom
Conversation
Collaborator
Pull Request Test Coverage Report for Build 15793114025Details
💛 - Coveralls |
Signed-off-by: Herambh Shah <herambhs@amazon.com>
1ee62c3 to
c66861d
Compare
forestkeeper
approved these changes
Jun 23, 2025
a63a930
into
babelfish-for-postgresql:BABEL_4_X_DEV
142 of 144 checks passed
sharathbp
pushed a commit
to amazon-aurora/babelfish_extensions
that referenced
this pull request
Sep 22, 2025
Issue Description: In Babelfish, the QUOTENAME function currently produces incorrect results for many queries due to flaws in its escape character handling logic. The function fails to properly escape characters that match the right delimiter. Also handle Unicode character handling in delimeter. Changes logic to accept fetch first character from delimeter string and use it as delimeter This PR is cherry-pick from 5_X_DEV to 4_X_DEV branch: babelfish-for-postgresql#3817 Solution: The escape logic has been updated to properly handle special characters. Now, when QUOTENAME encounters any character within the input string that matches the right delimiter, it correctly escapes that character. Updated logic to check byte size instead of len check. Issues Resolved :BABEL-2311 Signed-off-by: Herambh Shah <herambhs@amazon.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Issue Description:
This PR is cherry-pick from 5_X_DEV to 4_X_DEV branch
Cherry -picked PR.
Solution:
Issues Resolved
BABEL - 2311
Test Scenarios Covered
Check List
By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.