SQL Greatest and Least
July 21, 2009
, posted under
postgresql
mysql
sqlMost of the time I can get what I want out of SQL using the standard aggregate functions, but today I needed to find the latest timestamp from any one of three columns.
I achieved this using the GREATEST() function, it’s not part of the SQL standard but is commonly available.
Restoring an old Postgresql database
January 16, 2008
, posted under
postgresqlI’ve just had cause to restore a two year old backup of a database I haven’t used in a whileSince then postgresql (on Debian at least) has added the option to have multiple ‘clusters’ and multple versions running on the same machine.
Fortunately the old version (7.4) was still available
Steps