Re: Function Parameter Problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: fathur rohman <fathur_edp(at)yahoo(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Function Parameter Problem
Date: 2006-02-18 18:16:02
Message-ID: 20301.1140286562@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

fathur rohman <fathur_edp(at)yahoo(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Chandra Sekhar Surapaneni 2006-02-19 03:42:50 Re: how test postgresql.conf settings?
Previous Message fathur rohman 2006-02-18 07:42:08 Trigger and PL Registration Problem