Datatype and domain laboratory
Compare type choices, inspect exact decimal conversion boundaries and build reusable PostgreSQL domains. Browser predictions are bounded models; no database is connected or SQL executed.
Prepared export
Save each form before exporting. Saving/selecting restores other unsaved forms. Undo keeps 20 revisions in memory; export JSON before reloading.
Type comparison
Sample text inputs
Keep numeric values quoted: ["9007199254740993", "12.345", null]. Predictions model text assignment, not numeric-expression casts. Date/time, floats, JSON and binary inputs require server validation.
Domain catalogue
Generated CHECK predicates
Selected domain against saved sample inputs
Checks see the converted base value, after rounding/truncation. NULL remains allowed. Text equality uses exact Unicode here; PostgreSQL collation can differ. Regex, manual expectations and unsupported base conversions stay unevaluated. These are local predictions, not server pass/fail results.
Datatype decision reference
Storage figures describe the value representation, not a complete row, index or disk allocation. Alignment, headers, compression and TOAST can change physical size. Enum labels are a schema-level vocabulary with ordering and migration implications; use an enum when that lifecycle fits. A domain centralizes scalar constraints; a reference table can hold governed labels and additional attributes. JSONB suits evolving document structure, while declared columns provide explicit types and constraints.
Open lab JSON
Model scope and PostgreSQL validation
Designed for PostgreSQL 15+. Numeric precision is 1–1,000 and scale −1,000…1,000; negative scale or scale greater than precision is less portable. Finite decimals use exact BigInt arithmetic, with scale rounding before precision checks. NaN is supported by numeric; infinities require unconstrained numeric. Local integer previews accept signed whole-number text, not the full server input grammar. Numeric-expression-to-integer casts round differently and are outside this text-input model.
varchar previews model assignment: excess non-space characters reject, while excess spaces may be discarded. Explicit varchar casts truncate even non-space text; cast-probe SQL intentionally exposes that distinction. Unicode character counts and UTF-8 payload bytes are separate. No exact row-size estimate is made. Canonical UUIDs and common boolean spellings are previewed; other syntax requires PostgreSQL. DateStyle, TimeZone, JSON parsing, binary encodings, floating input and server collation are not emulated.
Domain DDL is for new definitions, not a migration or an ALTER plan. Create schemas separately and check for existing names. Base conversion occurs before CHECK predicates, which permit SQL NULL. Use column NOT NULL constraints for requiredness. Domain predicates support accepted numeric/text/boolean/UUID values, numeric bounds/finite-only and text length/regex rules. Regex is passed as an escaped PostgreSQL string and never executed by JavaScript. Manual notes and design ownership metadata are not SQL constraints/grants. Review errors and warnings, then validate DDL/casts on a disposable PostgreSQL database.
Limits: 1 MB; 6 candidates, 200 sample inputs, 50 domains, 200 accepted values/domain; 1,000 characters per sample/value/bound/regex; decimal exponent ±5,000. Previews show 40 samples/page and shorten long values; full strings stay in JSON and tooltips. Names assume 63-byte PostgreSQL identifiers. No inputs are stored or transmitted.