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

Fix a postgresql warning about OID 705 when running rspec tests #76

Merged

Conversation

jumichot
Copy link
Contributor

Hello ! This time with test passing, it was a small bug sorry for the duplicate PR

This warning is displayed when running test with rspec and postgresql :
unknown OID 705: failed to recognize type of 'read_mark_reader_type'. It will be treated as String.

You can see this warning in the project travis logs : https://travis-ci.org/ledermann/unread/jobs/118972216

And the result with the fix : https://travis-ci.org/jumichot/unread/jobs/136720171

Reading this rails PR the
fix for postgresql is to cast values when using 'AS' in custom queries.

Introduce that specific check for postgres seems ugly, but the problem appears only for postgres.
My second problem is the duplication, I don't know where to put a method that would the cast in both places. I'm not sure what would be the proper way to fix it, so I can make some changes if needed ;).

This warning is diplayed when running test with rspec and postgresql :
unknown OID 705: failed to recognize type of 'read_mark_reader_type'. It will be treated as String.

Reading this rails PR : https://github.com/rails/rails/pull/10498/files the
fix for postgresql is to cast values when using 'AS' in custom queries
@coveralls
Copy link

coveralls commented Jun 10, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling c66840c on jumichot:postgres_fix_unknown_oid_warning into 8f47e59 on ledermann:master.

@ledermann ledermann merged commit c66840c into ledermann:master Aug 22, 2016
@ledermann
Copy link
Owner

Thanks for your contribution, @jumichot! I have merged it with some small modifications.

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