Yesterday I had an interesting discussion on irc. A guy wanted to know why Perl script is causing problems when dealing with Pg and unicode characters. The discussion went sideways, I got (a bit) upset, and had to leave anyway, so I didn't finish ...

Every now and then I need a function that returns nothing. As you perhaps know, even defining function as "RETURNS VOID" doesn't fully solve the problem:

Today, on Stack Overflow there was interesting question. Generally, given table that looks like this: room | people | price | hotel 1 | 1 | 200 | ...

This post has been updated with new code that uses temporary table - the code is at the end of post! There was this question on Stack Overflow. For future reference: guy asked how to do session variables - i.e. something he ...