-
Notifications
You must be signed in to change notification settings - Fork 95
Improve output of results_eq and results_neq when number of columns or their types are different #255
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
Conversation
The challenge is that pgTAP currently supports Postgres 9.1 or higher and |
That's correct. That could be one of the reasons to drop support for 9.1, then... ;) I can see that it makes sense to support older, discontinued versions of PG, as long as this doesn't block any improvements / development. But the last release for 9.1 has been in 2016... In any case - if you still want to support 9.1, I can also put some conditionals in there to only enable this for 9.2+. |
Yes, let's keep 9.1 for at least one more release. |
4f10f1c
to
3932392
Compare
Added conditionals for pg 9.1. I tried the following at first:
But that results in a syntax error for I was not able to spin up a local pg 9.1 to test this - let's see what CI says. |
3932392
to
dd0f416
Compare
So.. that works for pg 9.1. But, when I understand the output correctly, the update from 9.1 to 9.2 is broken. This must be because the function is not created again when upgrading. And since the function itself is not "dynamic" regarding the pg version, the pg9.1 function (without stacked diagnostics) is run on pg 9.2. Any idea how to solve this? |
The way pgTAP has traditionally done this is to patch for older versions. So you'd leave |
3f3d22b
to
2fc8c80
Compare
So, I changed that and extended the patch. It does work the same way as before, but the update from pg 9.1 to 9.2 is still broken. And that makes sense, because running pg_upgrade does not add the |
2fc8c80
to
1987dfd
Compare
Ah, I can answer this myself now. Those cases are explicitly excluded in |
… their types are different
1987dfd
to
05e1dd0
Compare
It's a pain to debug right now, when you're only getting
Number of columns or their types differ between the queries
, but no additional info.This patch just uses
GET STACKED DIAGNOSTICS
to show the original error message, which has the differing types included.Not sure whether #37 would still be needed with this change.