dbml icon indicating copy to clipboard operation
dbml copied to clipboard

CREATE DOMAIN not supported

Open wichert opened this issue 3 years ago • 1 comments

I use SQL domains frequently to create custom types with set limitations. For example to define types that match zserio:

CREATE DOMAIN varint AS bigint CHECK (VALUE >= -9223372036854775808 AND VALUE <= 9223372036854775807);
CREATE DOMAIN varuint AS bigint CHECK (value >=0 AND VALUE <= 18446744073709551615);
CREATE DOMAIN varsize AS integer CHECK (VALUE >= 0 AND VALUE <= 2147483647);

sql2dbml trips over this file:

  ERROR: You have a syntax error at "zserio.sql" line 1 column 8. Expected "GLOBAL", "INDEX", "LOCAL", "SCHEMA", "SEQUENCE", "TABLE", "TEMP", "TEMPORARY", "TYPE", "UNIQUE", "UNLOGGED", or "VIEW" but "D" found.

wichert avatar Jan 18 '22 15:01 wichert

got the same issue today. Subscribed :)

nosovk avatar Mar 19 '23 13:03 nosovk