problem with my function - Mailing list pgsql-general

From Johnson, Shaunn
Subject problem with my function
Date
Msg-id 73309C2FDD95D11192E60008C7B1D5BB04C73AD0@snt452.corp.bcbsm.com
Whole thread Raw
Responses Re: problem with my function
Re: problem with my function
List pgsql-general

Okay:

I must be missing something vital; I thought my function
was working properly the other day, but now I can't
seem to figure out how I broke it.

[snip code]

drop function t_fastfunc(integer);
create function t_fastfunc(integer)
returns interger
as '
declare nCnt integer;
begin
        select count (*) into nCnt
        from t_stage_member;
        if nCnt < 1500000 then
        RAISE EXCEPTION ''Number of records is more than 1.5M'';
        return nCnt;
        end if;
end;
' language 'plpgsql';

[/snip code]

When I try to create it, I get the following error:

[error]

DROP
psql:./function_cnt.sql:18: NOTICE:  ProcedureCreate: return type 'interger' is only a shell
CREATE

[/error]

Question: What exactly is it tryiing to tell me about not returning a value?
And could someone explain what it means by 'only a shell'?

Thanks!

-X

pgsql-general by date:

Previous
From: Doug Fields
Date:
Subject: Re: Case Insensitive Data Type
Next
From: Tom Lane
Date:
Subject: Re: Case Insensitive Data Type