I have a mixed love/hate relationship with tests. I hate writing them. I hate remembering to add them when I'm in the zone, and application code is flowing freely from the tips of my fingers. But when I do add them, I ...
One of the most common questions is "how do I get select * from table, but without one of the column". Short answer is of course - name your columns, instead of using *. Or use a view. But I decided to ...
Dynamic updates of fields in NEW in PL/pgSQL Today, on #postgresql on IRC, strk asked about updating fields in NEW record, in plpgsql, but where name of the field is in variable. After some time, he sent his question to hackers mailing ...
On 18th of December Bruce Momjian committed very important, but relatively small, patch: Log Message: ----------- Install server-side language PL/pgSQL by default. There is no point in showing it, commit log tells all - basically from 8.5 on PL/pgSQL will be enabled by default ...
On 13th of November (I know, backlog again), Tom Lane committed patch which make PostgreSQL more strict about what happens in stored procedures in PL/pgSQL: Add control knobs for plpgsql's variable resolution behavior, and make the default be "throw error on conflict", ...
Pavel Stehule - hero for everybody writing stored procedures, wrote, and later Tom Lane committed patch which adds named arguments for functions: Log Message: ----------- Support use of function argument names to identify which actual arguments match which function parameters. The syntax uses ...
On 22nd of September, Tom Lane committed a patch by Petr Jelinek: Log Message: ----------- Implement the DO statement to support execution of PL code without having to create a function for it. Procedural languages now have an additional entry point, namely a function to execute ...
Yesterday on my favorite IRC channel fooqux asked interesting question. I took some more questions, and here is problem description: We have a system which, every 5 minutes, takes a number of tasks to be done. Tasks are uniform. Within 5 ...
On 29th of September (I know, there is a backlog - I'll work on it, I promise), Tom Lane committed another patch from Pavel Stehule: Allow MOVE FORWARD n, MOVE BACKWARD n, MOVE FORWARD ALL, MOVE BACKWARD ALL in plpgsql. Clean ...
One of my clients hit a strange limitation - apparently you cannot inherit CREATE ROLE privilege. First, let's test if it's really true:
