-
-
Save morellan/7ec903df3b4bc73e5ceaeff9d85b684a to your computer and use it in GitHub Desktop.
unknown OID 705: failed to recognize type of '<field>'. It will be treated as String.
This file contains 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
#!/usr/bin/env ruby | |
# If you get "unknown OID 705: failed to recognize type of '<field>'. It will be treated as String." | |
# it probably means that type of column could not be identified when retriving records | |
# Example | |
User.where("'something' as something") | |
# Will results in unknown OID. However doing this: | |
User.where("'something'::text as something") | |
# Will just work. Casting is important, dude! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment