http://www.leidecker.info/pgshell/Having_Fun_With_PostgreSQL.txt