On 18th of June, Tom Lane committed patch: Implement UPDATE tab SET (col1,col2,...) = (SELECT ...), ... This SQL-standard feature allows a sub-SELECT yielding multiple columns (but only one row) to be used to compute the new values of several columns to be updated. ...

Some time ago I wrote about my favorite method of bloat removal. Around one year earlier, I wrote about another idea for bloat removal. This older idea was great - it didn't involve usage of triggers, overhead on all writes, ...

On 8th of December, Tom Lane committed patch: Support automatically-updatable views. This patch makes "simple" views automatically updatable, without the need to create either INSTEAD OF triggers or INSTEAD rules. "Simple" views are those classified as updatable according to SQL-92 rules. The ...

If you worked with certain other (than PostgreSQL) open source database, you might wonder why PostgreSQL doesn't have MERGE, and why UPSERT example in documentation is so complicated. Well, let's try to answer the question, and look into some alternatives.

On 3rd of November Andrew Dunstan committed his patch which adds new function to PostgreSQL - suppress_redundant_updates_trigger(). This function is not for using in selects, but it can help you tremendously if your database access matches certain pattern.

Let's imagine following situation: create table test (id int4 primary key, priority int4); insert into test (id) select distinct (random() * 100000000)::int4 from generate_series(1,1000); Table test will now contain some (up to 1000) records, with random ids. Now, we want to ...