> d'oh! that was just a transcription error though...if you create f() > returning bigint and immutable it produces the same results. So I see. But... pedcard=# create function f2() returns boolean as $$ begin return 't'; end; $$ language plpgsql immutable; CREATE FUNCTION pedcard=# create function f3() returns varchar as $$ begin if (select f2() = 't') then return 'yes'; else return 'no'; end if; end; $$ language plpgsql; CREATE FUNCTION pedcard=# select f3(); f3 ----- yes (1 row) pedcard=# create or replace function f2() returns boolean as $$ begin return 'f'; end; $$ language plpgsql immutable; CREATE FUNCTION pedcard=# select f3(); f3 ----- yes (1 row) -- Scott Ribe scott_ribe@xxxxxxxxxxxxxxx http://www.killerbytes.com/ (303) 722-0567 voice