Jiri Nemec <[EMAIL PROTECTED]> writes: > CREATE FUNCTION foo(int2) > RETURNS TEXT > AS 'DECLARE ret TEXT; > begin > SELECT INTO ret CAST(name AS text) > FROM shop_goods > WHERE id = $1; > return ret; > end;' > language 'sql';
This is a plpgsql function, not a sql function --- you are selecting the wrong language. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])