Skip to content

Conversation

@hermanschaaf
Copy link
Member

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

@candiduslynx candiduslynx requested a review from erezrokah March 17, 2023 10:33
@candiduslynx candiduslynx changed the title fix: Normalize types in Postgres destination fix(postgresql): Normalize types in Postgres destination Mar 17, 2023
@hermanschaaf hermanschaaf merged commit eedea97 into main Mar 17, 2023
@hermanschaaf hermanschaaf deleted the postgresql-varchar branch March 17, 2023 14:06
@erezrokah
Copy link
Member

Looks great @hermanschaaf thank you for applying the fix 🚀

kodiakhq bot pushed a commit that referenced this pull request Mar 19, 2023
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).

<!--
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.

bug: postgresql unknown type character varying

6 participants