Postgresql/psycopg2 does not like str enum values
Bug #927433 reported by
brane
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Storm |
New
|
Undecided
|
Unassigned |
Bug Description
Tested with:
* postgresql: 8.3, 9.0
* Storm: 0.17, 0.18, 0.19
* psycopg2: 2.2, 2.4.4
As the attached test case shows, if you assign a plain str value to an Enum() property, that value gets sent to the database as bytea, which Postgres does not like to convert to ENUM values, and Storm throws the following error:
Programming
I've been using attached patch to EnumVariable.
To post a comment you must log in.
Storm uses byte strings to represent binary data and unicode strings to represent text. Enumeration labels are text, so if you are using byte strings to represent them in your code that sounds like a misuse of the API.
Unless I'm misunderstanding what you're trying to do, this bug is probably invalid.