Re: Function Parameter Problem - Mailing list pgsql-admin

From Tom Lane
Subject Re: Function Parameter Problem
Date
Msg-id 20301.1140286562@sss.pgh.pa.us
Whole thread Raw
In response to Function Parameter Problem  (fathur rohman <fathur_edp@yahoo.com>)
Responses Re: Function Parameter Problem
Re: Function Parameter Problem
List pgsql-admin
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

pgsql-admin by date:

Previous
From: fathur rohman
Date:
Subject: Trigger and PL Registration Problem
Next
From: "Chandra Sekhar Surapaneni"
Date:
Subject: Re: how test postgresql.conf settings?