Jose', Thank you for your response. > --COBOL level 88 using functions----------------------------------------------- > > drop function current_client(text); > create function current_client(text) returns bool as ' > DECLARE > status ALIAS for $1; > BEGIN > RETURN status IN (''A'',''a'',''P'',''p''); > END; > ' language 'plpgsql'; > > drop function active_client(text); > create function active_client(text) returns bool as ' > DECLARE > status ALIAS for $1; > BEGIN > RETURN status IN (''A'',''a''); > END; > ' language 'plpgsql'; > > select * from customer > where active_client(customer_status); > > select * from customer > where not active_client(customer_status); I guess what I was wondering... perhaps plpgsql could have an "automatic" local variable, say "current_row" so that the "text" would not have to be passed in... Thus create function current_client returns bool as ' BEGIN RETURN current_row.status IN (''A'',''a'',''P'',''p''); END; ' language 'plpgsql'; Then the select could look like this: select * from customer where active_client; Thoughts? :) Clark