add postgres connector test to pytest#212
Merged
Merged
Conversation
Contributor
caryhuang
commented
Jan 16, 2026
- pytest testing is updated to support postgres connector test
- github CI also modified to test postgres connector
- addressed issues reported by claude code
- resolved a crash with bit and varbit handling when the value is too long
> 2) synchdb docker image update to include mysql, postgres and oracle fdw capability > 3) ezdeploy updates
enabled postgres connector test on github CI
…into synchdb-devel
…t length to be less than declared
…or cannot handle array types properly
…into synchdb-devel
grantzhou
reviewed
Jan 19, 2026
| /* 8 bits per byte + extra zeros + terminating null */ | ||
| out = (char *) palloc0((tmpoutlen * 8) + extrazeros + 1); | ||
|
|
||
| elog(WARNING, "in len = %d, extrazero = %d, typmod = %d, trim = %d", (tmpoutlen * 8), |
Contributor
There was a problem hiding this comment.
This should be debug information and shouldn’t appear in production code. Consider deleting or changing it to DEBUG1.
Contributor
Author
There was a problem hiding this comment.
yes, it is indeed debug message that should not be at warning level
| assert len(rows) > 0 | ||
| for row in rows: | ||
| assert row[0].lower() == row[1] | ||
| # check attname mappings |
Contributor
There was a problem hiding this comment.
mixed use of tabs and spaces, Python is sensitive to indentation, which may lead to runtime errors
| assert len(rows) > 0 | ||
| for row in rows: | ||
| assert verify_default_type_mappings(row[0], row[1], dbvendor) == True | ||
| # check data type mappings |
Contributor
There was a problem hiding this comment.
mixed use of tabs and spaces, Python is sensitive to indentation, which may lead to runtime errors
| for row in rows: | ||
| assert verify_default_type_mappings(row[0], row[1], dbvendor) == True | ||
| # check data type mappings | ||
| rows = run_pg_query(pg_cursor, f"SELECT ext_atttypename, pg_atttypename FROM synchdb_att_view WHERE name = '{name}' AND type = '{dbvendor}'") |
Contributor
There was a problem hiding this comment.
mixed use of tabs and spaces, Python is sensitive to indentation, which may lead to runtime errors
| elif dbvendor == "postgres": | ||
| isfdw = run_pg_query_one(pg_cursor, f"SELECT EXISTS ( SELECT 1 FROM pg_available_extensions WHERE name = 'postgres_fdw' ) AS postgres_fdw_available") | ||
| if isfdw[0] == False: | ||
| print ("test_InitialSnapshotFDW_asis kipped - postgres_fdw not available for install") |
Contributor
There was a problem hiding this comment.
typo, kipped should be skipped
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.