Skip to content

Handle Long Identifiers for Babelfish#773

Open
anju15bharti wants to merge 1 commit into
babelfish-for-postgresql:BABEL_6_X_DEV__PG_18_Xfrom
amazon-aurora:BABEL-5975
Open

Handle Long Identifiers for Babelfish#773
anju15bharti wants to merge 1 commit into
babelfish-for-postgresql:BABEL_6_X_DEV__PG_18_Xfrom
amazon-aurora:BABEL-5975

Conversation

@anju15bharti

@anju15bharti anju15bharti commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Description

Engine-side changes to support long identifier handling in Babelfish.

  1. New hooks (bbf_get_original_constraint_name_hook, bbf_get_original_index_name_hook) allow the extension to resolve original constraint/index names in unique violation and check constraint error messages.

  2. tle_name_comparison_hook extended with sourcetext and locationparameters so ORDER BY clauses can match long column aliases by extracting the full identifier from the raw query text.

  3. View column truncation — When sql_dialect == SQL_DIALECT_TSQL and a view column name exceeds NAMEDATALEN, it is MD5-truncated before storage in pg_attribute.

  4. Rule rewrite tolerancecheckRuleResultList in rewriteDefine.c now allows a long SELECT column name to match its truncated attname counterpart for TSQL views.

  5. Dump supportbabelfish_identifier_mapping added to logical and physical dump paths.

  6. SyscacheIDENTMAPPINGNAME registered for the new identifier mapping catalog

Extension PR : babelfish-for-postgresql/babelfish_extensions#4866

Issues Resolved

BABEL-2564, BABEL-5975, BABEL-5321, BABEL-2650, BABEL-6817, BABEL-1518, BABEL-5207, BABEL-5650, BABEL-5416, BABEL-1519

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the PostgreSQL license, 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.

@anju15bharti anju15bharti force-pushed the BABEL-5975 branch 2 times, most recently from abf8aff to fed7432 Compare June 25, 2026 18:46
@anju15bharti anju15bharti force-pushed the BABEL-5975 branch 2 times, most recently from a07674e to 7e4fb80 Compare June 30, 2026 02:58
@anju15bharti anju15bharti changed the title Fix long idenitfier Handle Long Identifiers for Babelfish Jun 30, 2026
@anju15bharti anju15bharti marked this pull request as ready for review June 30, 2026 03:34
@anju15bharti

Copy link
Copy Markdown
Contributor Author

/code-review

Signed-off-by: anju15bharti <abanju@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant