Today, Tom Lane committed patch, written by Abhijit Menon-Sen, which adds interesting feature to psql. Namely – it simplifies changing definition of functions.
Tag: postgresql
Hunting “idle in transactions”
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?
NULLs vs. NOT IN()
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?
Waiting for 8.4 – case insensitive text ( citext )
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 )
Waiting for 8.4 – UNION / INTERSECT / EXCEPT
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
Removing elements from arrays
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.
Waiting for 8.4 – hash based DISTINCT
Today Tom Lane committed patch which gives DISTINCT ability to use hash aggregate – just like GROUP BY.
Waiting for 8.4 – RETURNS TABLE
Pavel Stehule wrote, and Tom Lane committed patch which ads new syntax for set-returning functions: “RETURNS TABLE".
Writing sprintf, and overcoming limitations in pl/perl
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
Waiting for 8.4 – variadic functions
Pavel Stehule wrote, and then Tom Lane committed (on 16th of July), patch which adds to PostgreSQL support for functions with variable number of arguments.