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 95B979DC841 for ; Sat, 18 Feb 2006 14:16:04 -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 87709-03 for ; Sat, 18 Feb 2006 14:16:04 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 498169DC849 for ; Sat, 18 Feb 2006 14:16:02 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k1IIG21D020302; Sat, 18 Feb 2006 13:16:02 -0500 (EST) To: fathur rohman cc: "pgsql-admin@postgresql.org" Subject: Re: Function Parameter Problem In-reply-to: <20060218074039.35198.qmail@web36806.mail.mud.yahoo.com> References: <20060218074039.35198.qmail@web36806.mail.mud.yahoo.com> Comments: In-reply-to fathur rohman message dated "Sat, 18 Feb 2006 07:40:39 +0000" Date: Sat, 18 Feb 2006 13:16:02 -0500 Message-ID: <20301.1140286562@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.11 required=5 tests=[AWL=0.110] X-Spam-Score: 0.11 X-Spam-Level: X-Archive-Number: 200602/229 X-Sequence-Number: 20650 fathur rohman writes: > 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 It's not the char argument that's giving you trouble there, it's the int2. I'd strongly suggest declaring the function to take plain int, else you're going to be writing a lot of downcasts to int2. int->int2 is not an implicit conversion. regards, tom lane