Lately in couple of places I recommended people that they can solve their problem with queries using LATERAL. In some cases recipient of such suggestion indicated that they had no idea what LATERAL is. Which made me think that it might be good idea to write more about them (lateral queries)…
Also – I know that some of the examples I shown in here can be done differently, I just wanted to show how one can use LATERAL, and am terrible with coming up with better usecases.
Continue reading What is LATERAL, what is it for, and how can one use it?
On 11th of November, Fujii Masao committed patch:
Add generate_series(numeric, numeric).
Reviewed by Michael Paquier, Ali Akbar and Marti Raudsepp
Continue reading Waiting for 9.5 – Add generate_series(numeric, numeric).
Let's imagine simple situation – you have table of objects (each with id), and you want objects 3, 71, 5 and 16. And in that order!
How to do it?
Continue reading How to order by some random – query defined – values?