On 11th of February, Tom Lane committed patch: Remove GROUP BY columns that are functionally dependent on other columns. If a GROUP BY clause includes all columns of a non-deferred primary key, as well as other columns of the same relation, those other ...

On 16th of May, Andres Freund committed patch: Support GROUPING SETS, CUBE and ROLLUP. This SQL standard functionality allows to aggregate data by different GROUP BY clauses at once. Each grouping set returns rows with columns grouped by in other sets set to NULL. This ...

On 17th of July, Noah Misch committed patch: Implement the FILTER clause for aggregate function calls. This is SQL-standard with a few extensions, namely support for subqueries and outer references in clause expressions. catversion bump due to change in Aggref and WindowFunc. David Fetter, reviewed ...

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: