X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id CB3059DCA16 for ; Sat, 18 Feb 2006 03:40:40 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 86506-04 for ; Sat, 18 Feb 2006 03:40:41 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web36806.mail.mud.yahoo.com (web36806.mail.mud.yahoo.com [209.191.85.57]) by postgresql.org (Postfix) with SMTP id 9C9919DC99D for ; Sat, 18 Feb 2006 03:40:38 -0400 (AST) Received: (qmail 35200 invoked by uid 60001); 18 Feb 2006 07:40:39 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=fx4OIyTZu10bwPW31hxFTwqABgM+MfpZ4/UJmDa8bmSA0EYZPH6IQ1PKxU/v/0GWkehO9ERVZ7MPuPIIfz4uG4ktTnRUGpRkInzCSdhOt8HCYu8VJAbrM1JWvpK25CGuf61maZDgJC8G+6G4cGiikQwzugWDjSQyRBRHv9yrVEo= ; Message-ID: <20060218074039.35198.qmail@web36806.mail.mud.yahoo.com> Received: from [61.5.41.18] by web36806.mail.mud.yahoo.com via HTTP; Sat, 18 Feb 2006 07:40:39 GMT Date: Sat, 18 Feb 2006 07:40:39 +0000 (GMT) From: fathur rohman Subject: Function Parameter Problem To: "pgsql-admin@postgresql.org" MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.138 required=5 tests=[AWL=-0.220, DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_WHOIS=0.879] X-Spam-Score: 1.138 X-Spam-Level: * X-Archive-Number: 200602/227 X-Sequence-Number: 20648 Hi Every Body, i'v finished creating function generate_sjno(str_no char(12), int_reset int2). when it called an error message raised, this is the illustration: baisdb=> select generate_sjno('20060130',6); ERROR: function generate_sjno("unknown", integer) does not exist HINT: No function matches the given name and argument types. You may need to ad d explicit type casts. my questions : 1. is always char become bpchar on function declaration? 2. is any missing on my function? 3. thanks all. this my function declaration : CREATE OR REPLACE FUNCTION generate_sjno(str_no bpchar, int_reset int2) RETURNS bpchar AS $BODY$ declare stran char(12); srsj char(4); begin select into stran max(substr(tranno,9,4)) from tran_hd where substr(tranno,1,int_reset)=str_no; if found then srsj:=lpad(((trim(stran)::int2)+1)::varchar(4),4,'0'); else srsj:='0001'; end if; stran:=substr(str_no,1,8) || srsj; return stran; end; $BODY$ LANGUAGE 'plpgsql' VOLATILE; Send instant messages to your online friends http://uk.messenger.yahoo.com