Understanding the Power of Data Types
postgres-data-types.pvh.ca
postgres-data-types.pvh.ca
It's pretty comprehensive and I especially liked the section about how datatypes are implemented internally (pg 25). I wish it went into more details though.
My only question is: if the "money" type is bad, what should we use instead? The author proposed a new "currency" type, but that doesn't exist yet.
OT: I initially thought that the article would be about function types, which are also called exponential types (hence the pun on "power").
One of the complexities there is that different systems can have different constraints for legal or technical reasons e.g. rates during a conversion could be "current" (whatever the last fetched / set rate was), "at point" (whatever the rate was at a time associated with the record somehow) or "fixed" (contractual), or probably multiple others. And in cases 1 and 2, different currencies in the system may (again contractually) use different references and update rates e.g. one client could use the fed with weekly updates while another uses xe updated daily.
And IIRC (I may be mistaken, or it may have been fixed since) you can't create a composite type which contains a foreign key to some other table.
With all of that said, this is super useful and helps me understand postgres better than I already did.
Besides that, I’m a fan of the styling and theme of their presentation. I just wish they hit “save as pdf” instead. I have a collection of PDFs for things like this, and I’m glad to know that they’ll probably work in 10 years — on the other hand, I have no idea if this URL will resolve in 10 years.
On the positive side, this slide format didn't destroy my browser history like a lot of them do, so that was appreciated. A lot of JS slide libs add a history entry for every slide, so getting back to the original page that linked it is a giant PITA. I've become accustomed with slides to using the browser's back button menu to jump back, often several times, and I was pleasantly surprised not to have to do that this time.