Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid type cast warning in build_coder_maps #330

Merged
merged 1 commit into from
Feb 7, 2020

Conversation

amarshall
Copy link
Contributor

@amarshall amarshall commented Feb 7, 2020

These columns are of text-like types (name, regproc) which are not mapped. Since they’re ultimately just treated as text, follow our own warning and cast them in SQL to avoid a Ruby type cast warning.

These columns are of text-like types (name, regproc) which are not
mapped. Since they’re ultimately just treated as text, follow our own
warning and cast them in SQL to avoid a Ruby type cast warning.
@larskanis larskanis merged commit 822bd91 into ged:master Feb 7, 2020
@larskanis
Copy link
Collaborator

LoL! That's the better fix! 😆

@amarshall amarshall deleted the avoid-typemap-warn branch April 18, 2020 17:30
@TSMMark
Copy link

TSMMark commented Feb 19, 2021

This appears to break redshift. It doesn't like the ::text part. cannot cast type regproc to character varying

Here's an example of a commit in another project that removes ::text casting in order to support redshift. npgsql/npgsql@5c7f266

Monkeypatching this method to revert to the old implementation fixes the issue in our codebase.

@larskanis
Copy link
Collaborator

@TSMMark Could you please open a new issue for the Redshift incompatibility? I think we can solve it similar to your linked proposal.

@TSMMark
Copy link

TSMMark commented Feb 19, 2021

@larskanis done #369 thanks for the quick response

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.

3 participants