File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1161,3 +1161,20 @@ async def test_unknown_type_text_fallback(self):
11611161 await self .con .execute (r'DROP TYPE citext_range' )
11621162 await self .con .execute (r'DROP TYPE citext_dom' )
11631163 await self .con .execute (r'DROP EXTENSION citext' )
1164+
1165+ async def test_enum_in_array (self ):
1166+ await self .con .execute ('''
1167+ CREATE TYPE enum_t AS ENUM ('abc', 'def', 'ghi');
1168+ ''' )
1169+ result = await self .con .fetchrow ('''SELECT $1::enum_t[];''' ,
1170+ ['abc' ])
1171+ self .assertEqual (result , (['abc' ],))
1172+
1173+ result = await self .con .fetchrow ('''SELECT ARRAY[$1::enum_t];''' ,
1174+ 'abc' )
1175+
1176+ self .assertEqual (result , (['abc' ],))
1177+
1178+ await self .con .execute ('''
1179+ DROP TYPE enum_t;
1180+ ''' )
You can’t perform that action at this time.
0 commit comments