Mario Splivalo wrote:
Of course, if it returns no rows, I'm presented with an error, saying:
ERROR: record "rec" has no field "_qv"
This is logical. My question would be is there a way around this
withouth first doing SELECT COUNT(*) FROM tmbBids WHERE ..., and then if
COUNT(*) is zero THEN bidCount := NULL ELSE if COUNT(*) is not zero then
do SELECT from the begining?
Could you check the FOUND variable? As in IF NOT FOUND THEN RETURN NULL
--
Richard Huxton
Archonet Ltd
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org