[SQL] plpgsql function return multiple values?

2001-07-30 Thread John Oakes
Is it possible for a plpgsql function to return a record? I need to return multiple values, and preferably in the form of a record. Thanks in advance! John ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister com

[SQL] Why does this plpgslq always return 1?

2001-07-27 Thread John Oakes
Can anyone tell me why this always return 1? Thanks! CREATE FUNCTION passrate(date, date, text) RETURNS float AS ' DECLARE begindate ALIAS FOR $1; enddate ALIAS FOR $2; passfail ALIAS FOR $3; ret float; countp float; counttotal float; BEGIN SELECT INTO countp COUNT(*) FROM benchmar