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

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

Suppressing CONTEXT lines in psql

CONTEXT messages are quite informative, but when you don't need them, they can be real pain in the eyes:

psql:trees.sql:68: NOTICE:  Adding tree structures to table public.testit.
CONTEXT:  SQL function "add_tree_structure" statement 1
psql:trees.sql:68: NOTICE:  Tree table will be public.testit_tree.
CONTEXT:  SQL function "add_tree_structure" statement 1
psql:trees.sql:68: NOTICE:  Primary key in source table is: id
CONTEXT:  SQL function "add_tree_structure" statement 1

I mean – I know the context. I'm writing the sql file right now, how to disable it?

Continue reading Suppressing CONTEXT lines in psql