News for hackers. Stuff that matters.
Re:Common mistakes in PostgreSQL by mhd on Friday May 03, 2019 @11:47AM (#19819436)
The problem is that even with serial numbers things aren't as fixed. You might have a different type of serial number, zip code, etc.. A check constraint can be expanded to do the appropriate length and formatting checks for most types. A strict length restriction just does one simple thing.

Same with name and address fields. I've seen databases where they set it at an seemingly arbitrary number, because that's the maximum length their delivery service could handle (UPS etc.), but then they added another one with different constraints…

There are no comments on this comment yet.