Today some guy on IRC asked question, which I didn't fully understand, but which could (probably) be summarized: how to group data into 5 minute intervals, based on some timestamp column. Well, it seems trivial (as long as you know how ...

My jabber server had the feature, that it logs all messages that got sent through it. This is pretty cool, and useful. And now, i got asked to use it to create list of conversations. What exactly is this? Whenever I send ...

Yesterday (August, 7th), Tom Lane committed: Log Message: ----------- Recognize functional dependency on primary keys. This allows a table's other columns to be referenced without listing them in GROUP BY, so long as the primary key column(s) are listed in GROUP BY.   Eventually we should ...

Let's assume you have some simple database with "articles" - each article can be in many "categories". And now you want to get list of all articles in given set of categories. Standard approach: select a.* from ...

Let's assume you have very simple table with users: # \d users Table "public.users" ...

When I was working for one of customers we found some strange thing. We needed to found number of distinct sessions per day. Table layout was very simple: