Enum and postgresql

I am using VP-UML, version 8.3 and I’m working on an ERD for a postgresql database.
I would like to use ENUM data types in my columns, which is done in postgresql by defining a data type as ENUM and then using that data type by name in column definitions. I can’t find a way of doing this. I can enter ENUM(“a”,“b”,“c”) into the user type field of the column definition but that is not reflected in the diagram at all and the DDL that is created does not show the ENUM type or the required line for creating the ENUM type in the first place. How can this be done?
Thanks for your help!

Hello fschwach,

You can model the enum in the user type field in Column’s specification dialog. After that you an right click on the diagram and select Presentation Options > Entity Columns Display Options > Show Column User Type to bring it to diagram. The engine will follow the user type when generating DDL.

Best regards,
Rain

model_enum_in_column.png

Thanks Rain,

Following your advice I can get the entity to show the enum type now but when I generate the DDL it still creates a varchar column, not an ENUM. I selected varchar as the type and then entered enum(‘a’,‘b’) n the user type, as you have shown. Could be a problem with PostgreSQL where ENUM is not a data type per se but has to be created in a separate statement(?)

No solution for this? Does it mean that ENUM data type is not supported for PostgreSQL databases?

is this really not possible at all with PostgreSQL?

Hi users,

We do not support modeling and generating type. However, you can put the create type statement in “Custom DDL” section in DDL Header window, then we’ll include it in the generated DDL. Create table column with the enum type can be specified in the column user type.

I have attached an image to show you both of them.

Best regards,
Jick Yeung


ddl-idea.png