Hi, > Point being that H2 should either implement DOMAINS properly or not at all.
I think current implementation can satisfy needs of many developers (for example for postgres applications compatibility) so there is no reason to remove it. Still as a developer which seriously using H2 you are allways welcome to submit patch with better implementation if you dislike current ;) regards, Sergi On 8 сен, 18:53, Rami <[email protected]> wrote: > Hi, > > Domains do not seem to be real domains but rather a syntactic shorthand. > > Proof: > CREATE DOMAIN COLOR AS INTEGER CHECK (VALUE >= 0 AND VALUE <= 16777215); > > CREATE TABLE FOO ( C1 COLOR ); > > At this point INFORMATION_SCHEMA.COLUMNS tells me that the type (domain > in sql parlance) > is INTEGER. But no worries the check constraint is still the same. So > even though the type is > already lost it still worked alright as a syntactic shorthand. > > So let's continue > > CREATE TABLE BAR AS SELECT C1 AS C2 FROM FOO; > > Now BAR.C2 has as it's type INTEGER and the check constrint has disappeared. > No more traces of my COLOR type. > > Point being that H2 should either implement DOMAINS properly or not at all. > Trying out features that don't work takes quite a lot of time from each > and every developer > seriously using H2. > > Also concepts that have been clearly thought out and implemented are > easier to document. > > - Rami "overdosing on coffeine" Ojares -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
