generating unique keys that work with optional postgresql attributes

sorry i'm kinda new to ER/Studio DA.

i'm having a problem with postgres unique keys that include an attribute that is optional (ie. can be null). postgresql does not evaluate (null = null) as true.

thus for unique keys that i have defined on, say, "name" and "record_end_date" where "record_end_date" could be null, i need to modify the generated ddl from:

CREATE UNIQUE INDEX t_uk ON table_name(name, record_end_date);

to:

CREATE UNIQUE INDEX t_uk ON table_name(name, (record_end_date is NULL)) where record_end_date is null;

i do this via a sed script after ddl generation but things are starting to get more complicated.

any idea how i can do this in the tool?

thanks in advance.