Re:PostgreSQL 9.3 Beta 1 Released
by papsosouid on Monday May 13, 2013 @02:27PM
(#5700473)
Yes and no. Yes in that I am talking specifically about check constraints when I say that we have to duplicate them all in our apps. You can't really duplicate the others. But no in that I don't mean to validate only check constraints and report all failures, ideally it would do unique and FK too. If there's an underlying reason that isn't feasible, then doing all the check constraints at once would certainly be a big improvement though. We're already in the position of having data validation type checks done separately from uniques now, so that would get users of our apps the current behaviour while letting us delete a bunch of code.
[ Parent
| on HN ]
FWIW, we try very hard to not write any check constraints and do any such validation at the protocol level, before the request even hits the authn/authz layer. (Spyne makes it easy ! http://spyne.io)
Re:PostgreSQL 9.3 Beta 1 Released
by papsosouid on Monday May 13, 2013 @03:34PM
(#5700906)
>FWIW, we try very hard to not write any check constraints
I like check constraints. I would never consider removing them under any circumstances, I've dealt with far too many databases full of inconsistent data. I'd just rather not have to duplicate them (or triplicate, etc) in each of my apps that accesses the database.