3 ms·
> The DB may only care that it's UTF and max 20 chars. But the system requires more validation than that. Are you familiar with SQL constraints, triggers, user
by int_19h 8y ago
> The DB may only care that it's UTF and max 20 chars. But the system requires more validation than that.
Are you familiar with SQL constraints, triggers, user-defined functions, stored procedures?..
- garyclarke27 8y agoYes + Postgres has Domains which are very nice, especially if you use only Functions for data insert (which i do) This gives you more granularity, than a domain on a Column. Domians are like Dependent Types, offering very fine grained control, enforced by RegEx, functions, enums, even lookup functions are ok so long as lookup tables are stable.
- bushin 8y agolmao, “my schema is my app layer”.