Postgresql enum types are shown as varchar

Hi,

In the tree view, the type is VARCHAR instead of the proper enum type.
When trying to use the grid view to insert/update a row which contains a column col1 with type enum_vessel_status, pg return the following error:

[42883] ERROR: operator does not exist: enum_vessel_status = character varying Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts. Position: 80

But if I go to the console and create a query manually like

UPDATE table1
SET  col1 = 'VALUE_IN_ENUM'

it works without needed to cast the 'VALUE_IN_ENUM', which is the proper behavior as described http://www.postgresql.org/docs/9.4/static/datatype-enum.html.
It seems that the query sent by the plugin in grid is adding a wrong cast:

UPDATE table1
SET  col1 = 'VALUE_IN_ENUM'::character

Any clue ? This is annoying.

Jean

1 comment
Comment actions Permalink

Hello Jean,

This is known issue and we are working on this. Please vote and follow this YouTrack problem https://youtrack.jetbrains.com/issue/DBE-847 , https://youtrack.jetbrains.com/issue/DBE-1360 . Please see https://intellij-support.jetbrains.com/hc/en-us/articles/206827497 if you are not familiar with YouTrack.

0

Please sign in to leave a comment.