5 ms·
Understanding the Power of Data Types
- fyp 7y agoIn case people read the comments first, this is about postgres data types. 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.
- giornogiovanna 7y agoYes, it's a very nice overview of Postgres data types. 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").
- teddyh 7y agoMy current understanding is that DECIMAL (a.k.a. NUMERIC) is the recommended type for monetary values in PostgreSQL.
- toolslive 7y agomaybe it (Postgres) should be in the title so people don't need to click through only to learn they're not interested.
- masklinn 7y ago> money is not a good type, and we can do better. 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.
- eyelidlessness 7y agoI don't normally comment on the presentation format instead of the content, but using this slideshow was extremely frustrating and really detracted from my ability to learn from it. It's really unusual to have scrollable elements inside slides, it's very very frustrating to also have scroll gestures on a trackpad inside those elements skip a bunch of slides. There's content that just is not accessible without doing a lot of work, and that's disappointing. With all of that said, this is super useful and helps me understand postgres better than I already did.
- lsorber 7y agoWhat is your preferred format for digesting content like this?
- ryanmjacobs 7y agoNot the parent comment, but I would have loved a standalone PDF file. It’s easy to scroll through, so I can resume reading if I know what page I was on. Ctrl-f works across the whole document. E-readers typically can render it fine. 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.
- eyelidlessness 7y agoI wouldn't really mind a set of slides if it was formatted to prevent scrollable content, or even if scrolling didn't switch slides. 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.