Re: [Haskell-cafe] Property checks and PostgreSQL?

PostgreSQL data base, Haskell back end, PureScript front end. And there is a fault somewhere in this stack: sometimes some items present in the data base do not make it to the front end. A small fortune in programmer hours has been spent ...
Speaking purely from a SQL-and-stuff point of view, "programmer hours spent" sounds to me like a problem with nulls. Are any of your columns nullable? Are you sure they should be nullable? In particular are any of the columns in the keys nullable? Or any of the columns on which you're joining tables? (Perhaps a proper value in one table, but a null in the table it's supposed to equal?) How are you mapping between Haskell field values to/from nullable columns in the SQL? Is that mapping fool-proof? Is it consistent across different tables using what should be the same value? And in general: SQL nulls are an abomination; don't do that; do normalise your database schema to avoid nulls. AntC (35 years an SQL programmer, never trusted it)
participants (1)
-
Anthony Clayden