dbml
dbml copied to clipboard
CREATE DOMAIN not supported
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.
got the same issue today. Subscribed :)