If you ever encountered “idle in transaction" connections, you most likely hate them. I know, I personally hate them. They interfere with most of “cool toys" like replication, vacuum, DDL queries.
So, when I saw them on a database I was looking on, I decided to act.
Easier to say, difficult to do. How to fix the problem?
Continue reading Hunting “idle in transactions"
Friend of mine found something that he thought looked like a bug in Pg.
Very simple query:
select * from table where id not in (select field from other_table)
was not returning any rows, despite the fact that there definitely are some “ids" that are not in other_table.field. Why is that?
Continue reading NULLs vs. NOT IN()
On 29th of July, Tom Lane committed patch written by David E. Wheeler, which added new contrib module: citext.
Continue reading Waiting for 8.4 – case insensitive text ( citext )
During last month or so, Tom Lane commited changes in PostgreSQL, which were foundations for adding hash-based versions of popular features.
I already described first such feature – DISTINCT.
Now, there were 3 more commits which were related to this:
Continue reading Waiting for 8.4 – UNION / INTERSECT / EXCEPT
Cezio wrote post about removing elements from arrays in PostgreSQL.
Unfortunately his blog engine requires registration before comment, which I don't like, so I decided to comment using my own blogspace.
Continue reading Removing elements from arrays
Today Tom Lane committed patch which gives DISTINCT ability to use hash aggregate – just like GROUP BY.
Continue reading Waiting for 8.4 – hash based DISTINCT
Pavel Stehule wrote, and Tom Lane committed patch which ads new syntax for set-returning functions: “RETURNS TABLE".
Continue reading Waiting for 8.4 – RETURNS TABLE
Having new VARIADIC functions, I decided it would be cool to be able to write sprintf() function.
Basically the idea is simple, plperl function, which takes “format", and list of arguments and returns generated output.
Continue reading Writing sprintf, and overcoming limitations in pl/perl