From: Tom Lane <tgl@sss.pgh.pa.us>
To: fathur rohman <fathur_edp@yahoo.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Function Parameter Problem
Date: Sat, 18 Feb 2006 13:16:02 -0500
Message-ID: <20301.1140286562@sss.pgh.pa.us> (raw)
In-Reply-To: <20060218074039.35198.qmail@web36806.mail.mud.yahoo.com>
References: <20060218074039.35198.qmail@web36806.mail.mud.yahoo.com>
fathur rohman <fathur_edp@yahoo.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, fathur_edp@yahoo.com
Subject: Re: Function Parameter Problem
In-Reply-To: <20301.1140286562@sss.pgh.pa.us>
References: <20060218074039.35198.qmail@web36806.mail.mud.yahoo.com> <20301.1140286562@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox