That's actually a feature defined by the SQL standard. E.g. you can see "Null values are not considered equal" in https://www.postgresql.org/docs/current/static/indexes-unique.html
A workaround can be partial indexes if supported by the database, something like: CREATE UNIQUE INDEX IDX_12_3NULL ON SOMETHING_TABLE (COLUMN1, COLUMN2) WHERE COLUMN3 IS NULL; In H2 I think it should be possible to add computed columns with NOT NULL results and then index those. Regards, Alex On Sun, Oct 9, 2016 at 12:31 PM, Noel Grandin <[email protected]> wrote: > Confirmed that that this is indeed a bug, even in latest master, please > log an issue in our tracker so we don't forget it. > > https://github.com/h2database/h2database/issues > > Thanks, > > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/h2-database. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
