Open rishabhtanwar29 opened 1 week ago
Totals | |
---|---|
Change from base Build 9647525510: | 0.003% |
Covered Lines: | 42827 |
Relevant Lines: | 58498 |
Totals | |
---|---|
Change from base Build 9766489889: | 0.0% |
Covered Lines: | 42837 |
Relevant Lines: | 58523 |
Totals | |
---|---|
Change from base Build 9766489889: | 0.0% |
Covered Lines: | 42837 |
Relevant Lines: | 58523 |
Totals | |
---|---|
Change from base Build 9766489889: | 0.0% |
Covered Lines: | 42837 |
Relevant Lines: | 58523 |
Totals | |
---|---|
Change from base Build 9766489889: | 0.0% |
Covered Lines: | 42837 |
Relevant Lines: | 58523 |
Totals | |
---|---|
Change from base Build 9766489889: | 0.0% |
Covered Lines: | 42837 |
Relevant Lines: | 58523 |
Description
Babelfish supports column ordering and NULLs ordering in table constraints but PG does not. It was implemented through special grammar rule and few dialect T-SQL dialect dependent logic in engine. Currently this is not handled in pg_dump so the information about column/nulls ordering gets lost during dump. Although, this information is available in the underlying index for a UNIQUE/PRIMARY KEY constraint but this information anyway gets lost since the underlying index does not get dumped for a UNIQUE/PRIMARY KEY constraint, instead it is dumped as a constraint.
To fix this issue, we will now dump the underlying index of a UNIQUE/PRIMARY KEY constraint and make use of ALTER TABLE ADD CONSTRAINT USING snytax to add that as constraint. Postgres disallows creation of an constraint using index like this for non default sort ordering as native pg_dump does not handle such constraints. So we will need to bypass that check for Babelfish dump/restore with this special handling in bbf_dump.
Task: BABEL-4888 Signed-off-by: Rishabh Tanwar ritanwar@amazon.com
Engine PR: https://github.com/babelfish-for-postgresql/postgresql_modified_for_babelfish/pull/395
Test Scenarios Covered
Use case based -
Boundary conditions -
Arbitrary inputs -
Negative test cases -
Minor version upgrade tests -
Major version upgrade tests -
Performance tests -
Tooling impact -
Client tests -
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.