203 Articles tagged “PostgreSQL”

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* Now, another example use case rose on IRC today.



Although the new asynchronous replication facility that ships with 9.0 ain’t released to the wide public yet, our hackers hero are already working on the synchronous version of it. A part of the facility is rather easy to design, we want something comparable to DRBD flexibility, but specific to our database world. So synchronous would either mean recv, fsync or apply, depending on what you need the standby to have already done when the master acknowledges the COMMIT.


Happy Numbers

After discovering the excellent Gwene service, which allows you to subscribe to newsgroups to read RSS content ( blogs, planets, commits, etc), I came to read this nice article about Happy Numbers. That’s a little problem that fits well an interview style question, so I first solved it yesterday evening in Emacs Lisp as that’s the language I use the most those days. A happy number is defined by the following process.


Playing with bit strings

The idea of the day ain’t directly from me, I’m just helping with a very thin subpart of the problem. The problem, I can’t say much about, let’s just assume you want to reduce the storage of MD5 in your database, so you want to abuse bit strings. A solution to use them works fine, but the datatype is still missing some facilities, for example going from and to hexadecimal representation in text.


Dimitri Fontaine

PostgreSQL Major Contributor

Open Source Software Engineer

France