I realized the following facts using SQL language functions:
There is a function "function_y(...)" which returns int4; a table z and
two functions:
CREATE FUNCTION function_x1() RETURNS int4 AS '
select function_y(any_of_fields_of_table_z) from z;
' LANGUAGE 'SQL';
This calls function_y(...) only with the first row of the query output of
the select statement. Instead of this,
CREATE FUNCTION function_x2() RETURNS int4 AS '
select function_y(z_field_any) from z;
select 1;
' LANGUAGE 'SQL';
works properly (the important thing for me is to call function_y with
all rows of the select query). So, the second workaround is OK, but in my
opinion function_x1() also should call function_y(...) for as many rows as
exist in the output. Is this a bug?
I am using 7.0 (8th May).
Regards,
Zoltan