Gavin Baumanis <gavinb(at)eclinic(dot)com(dot)au> writes:
> If I perform the following SQL
> SELECT MAX(column) FROM table WHERE expression
> and there is no match, Postgres returns a record count of 1.
> There is no value in max, it is NULL.
This is the behavior required by the SQL standard.
> Thus trying to perform some "other" tasks based on if a record was
> returned or not is proving a little difficult in this instance.
Test for null result, perhaps?
regards, tom lane