Skip to content

Avoid type cast warning in build_coder_maps#330

Merged
larskanis merged 1 commit intoged:masterfrom
amarshall:avoid-typemap-warn
Feb 7, 2020
Merged

Avoid type cast warning in build_coder_maps#330
larskanis merged 1 commit intoged:masterfrom
amarshall:avoid-typemap-warn

Conversation

@amarshall
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

LoL! That's the better fix! 😆

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

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
Copy Markdown
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
Copy Markdown

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