Here is an example of what i would like to do...
---------------------------------------
---------------------------------------
CREATE FUNCTION fun_totalrecords(varchar) RETURNS int8 AS'
DECLARE
theTable ALIAS FOR $1;
result int := 0;
BEGIN
DECLARE
theTable ALIAS FOR $1;
result int := 0;
BEGIN
result = COUNT(*) FROM theTable; -- this is where i need help
RETURN result;
END; 'LANGUAGE 'plpgsql';
---------------------------------------
Thanks for the help....
Clark