What if you could turn
thousands of lines of code into
simple queries?

The previous article about M-x mailq has raised several mails asking me details about the Postfix setup I’m talking about. The problem we’re trying to solve is having a local MTA to send mails, so that any old-style Unix tool just works, instead of only the MUA you’ve spent time setting up. Postfix makes it possible to do that quite easily, but it gets a little more involved if you have more than one relayhost that you want to use depending on your current From address.


I wrote a book!


Nowadays, most people would think that email is something simple, you just setup your preferred client (that’s called a MUA) with some information such as the smtp host you want it to talk to (that’s call a MTA and this one is your relayhost). Then there’s all the receiving mails part, and that’s smtp again on the server side. Then there’s how to get those mail, read them, flag them, manage them, and that’s better served by IMAP.


I wanted to play with the idea of using the whole keyboard for my switch-window utility, but wondered how to get those keys in the right order and all. Finally found quail-keyboard-layout which seems to exists for such uses, as you can see: (loop with layout = (split-string quail-keyboard-layout "") for row from 1 to 4 collect (loop for col from 1 to 12 ("q" "w" "e" "r" "t" "y" "u" "i" "o" "p" "[" "]") ("a" "s" "d" "f" "g" "h" "j" "k" "l" ";" "'" "\\") ("z" "x" "c" "v" "b" "n" "m" "," ".


Window Functions example remix

The drawback of hosting a static only website is, obviously, the lack of comments. What happens actually, though, is that I receive very few comments by direct mail. As I don’t get another spam source to cleanup, I’m left unconvinced that’s such a drawback. I still miss the low probability of seeing blog readers exchange directly, but I think a tapoueh.org mailing list would be my answer, here… Anyway, David Fetter took the time to send me a comment by mail with a cleaned up rewrite of the previous entry SQL, here’s it for your pleasure!


Window Functions example

So, when 8.4 came out there was all those comments about how getting window functions was an awesome addition. Now, it seems that a lot of people seeking for help in #postgresql just don’t know what kind of problem this feature helps solving. I’ve already been using them in some cases here in this blog, for getting some nice overview about Partitioning: relation size per “group”. That’s another way to count change

Dimitri Fontaine

PostgreSQL Major Contributor

Open Source Software Engineer

France