Poking around the Postgres docs, apparently version 6.5 had a built-in
ifnull function. See:
http://www.postgresql.org/users-lounge/docs/6.5/user/functions.htm while 7.0 has a
nullif function. See:
http://www.postgresql.org/users-lounge/docs/7.0/user/functions.htm. Odd, that the name changed between versions...