Closed mjperrone closed 10 months ago
Looks like this should reveal the valid enum types:
SELECT unnest(enum_range(NULL::test_enum_type_mood));
unnest
--------
sad
ok
happy
(3 rows)
Ohh, this one's going to be tricky in the same way that PG array dimensions and types was tricky (#411).
It looks like we need to use udt_
stuff in the information_schema.columns
view and also the pg_enum
view to get the possible enum values.
EDIT: Gah, didn't see your second comment. Yea, that would be an alternative way to get the valid enum types.
I'm also curious how PG handles arrays of enums. I expect it to enforce valid values for the arrays, but given that it doesn't enforce dimensions, it's worth poking at this to make sure.
It appears that the postgres -> recap converter currently does not support enums. It looks like there is no reference to
enum
in the postgres converter code. I also don't see any tests referencing enum in the postgres client integration tests.I'm having some trouble getting my local recap dev env working, so I haven't tested this test, but I think this test in this PR should show the limitation:
https://github.com/recap-build/recap/pull/414