fix(postgresql): Normalize types in Postgres destination#9143
Merged
hermanschaaf merged 1 commit intomainfrom Mar 17, 2023
Merged
fix(postgresql): Normalize types in Postgres destination#9143hermanschaaf merged 1 commit intomainfrom
hermanschaaf merged 1 commit intomainfrom
Conversation
candiduslynx
approved these changes
Mar 17, 2023
disq
approved these changes
Mar 17, 2023
Member
|
Looks great @hermanschaaf thank you for applying the fix 🚀 |
kodiakhq bot
pushed a commit
that referenced
this pull request
Mar 19, 2023
🤖 I have created a release *beep* *boop* --- ## [3.0.1](plugins-destination-postgresql-v3.0.0...plugins-destination-postgresql-v3.0.1) (2023-03-19) ### Bug Fixes * **postgresql:** Normalize types in Postgres destination ([#9143](#9143)) ([eedea97](eedea97)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
kodiakhq bot
pushed a commit
that referenced
this pull request
Jun 7, 2023
#### Summary Fixes #11325 Same as #9143 for MySQL destination. Type handling taken from https://github.com/cloudquery/cloudquery/pull/11214/files#diff-c4ee14fff2e1c7cbea7dfcf122879522b5d817aaa041f54564696293b1c6bc30R90. Once we have the MySQL source migrated to v3 we can add support for more granular types like `char(x)` or other fixed size types (doing that will be a breaking change). <!--
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.
Fixes #9141. This will allow CloudQuery to sync to tables that had their schemas created by some external process, as long as the column can be normalized to a CloudQuery type. This is mostly useful for Postgres -> Postgres sync use cases right now. As we improve the internal type system, we should be able to do away with these training wheels and create the same column types on the destination as we find on the source for such cases.
The type normalization is copied from the Postgres source