-
In my codebase, I haven't seen this error until I introduced an enum to my migrations. Strangely, the tests will pass just fine if run in isolation. But I use testify's suite to run all tests and this is when the error starts occurring. The full error is
What does that error indicate? A problem with the database? Something I'm not doing correctly with enums using pgx? I found this relating to sqlc (which i'm also using) but the code pertains to registering types with pgx in a situation where the user needs to use CopyFrom. Since I'm not registering the types, and the tests pass in isolation, would this apply to my code? I've tried implementing it as well, but it didn't solve my problem. This is my setup function:
I don't want to dump a lot of code yet into this thread until I'm sure I'm in the right area asking for help. For starters, the above way is how i've set up all my tests for the connections and until I've used an enum, hasn't given me any issues. If this is in fact a pgx issue I'm having, I'll gladly add more supporting information upon request. Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The error message is from the PostgreSQL server, so I suspect the issue is not directly from pgx. enums can have some odd behavior connected to transactions, but I'm not sure if that is related to what's happening here or not. |
Beta Was this translation helpful? Give feedback.
The error message is from the PostgreSQL server, so I suspect the issue is not directly from pgx.
enums can have some odd behavior connected to transactions, but I'm not sure if that is related to what's happening here or not.