"ezra epstein" <ee_newsgroup_post(at)prajnait(dot)com> writes:
> PublishWorks=> select count(item.*) from merchandise.ds_item(6) item;
> server closed the connection unexpectedly
I can't duplicate it here; sure the problem isn't in your function?
regression=# create function z() returns setof tenk1 as
regression-# 'select * from tenk1' language sql;
CREATE FUNCTION
regression=# select count(*) from z();
count
-------
10000
(1 row)
regression=# select count(a.*) from z() a;
count
-------
10000
(1 row)
regards, tom lane