Entries by Gianni Ciolli

CTE and the Birthday Paradox

An interesting query has been twitted by Will Leinweber from Postgres Open: — this returns a different result each time it is ran with recursive s as ( select random() union select random() from s ) select count(*) from s; I like this example: a surprising result, which can be explained by (and indeed helps to explain) CTE […]

pgChess code published

I have been lucky enough to be invited at the marvellous PGDay.eu 2012 conference in Stuttgart, which ended just yesterday. The topic of the first of my two talks has been a collection of PostgreSQL objects that play chess, either between themselves or against a human.