Re: [GENERAL] Fwd: parameter type is unknown error - Mailing list pgsql-general

From Tom Lane
Subject Re: [GENERAL] Fwd: parameter type is unknown error
Date
Msg-id 7570.1488803785@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] Fwd: parameter type is unknown error  (Günce Kaya <guncekaya14@gmail.com>)
List pgsql-general
=?UTF-8?Q?G=C3=BCnce_Kaya?= <guncekaya14@gmail.com> writes:
> I think the problem is not associated with you suggestion cause I changed
> both of two parameter type as varchar(by the way, I deleted address column
> and I only have two column that got me crazy!) still doesn't insert any
> data.

There are a lot of moving parts there, but I think probably the one that
is actually failing is that you're passing "400" to a parameter declared
as "money".  There's no implicit integer-to-money cast so that doesn't
work.  (That cast is assignment level which is why failing to cast works
if you insert directly.)

Or at least that's what it appears from your sample call, but I'm confused
about why your error message reads

ERROR:  function cargo.insertinvoice(integer, integer, integer, *unknown,
unknown, unknown*, integer, timestamp with time zone, integer, integer,
money, timestamp with time zone, timestamp with time zone, timestamp with
time zone) does not exist

I do not think this message corresponds to the sample call you showed us,
because the whole point is that the eleventh parameter wasn't already of
type "money".

            regards, tom lane


pgsql-general by date:

Previous
From: "Charles Clavadetscher"
Date:
Subject: Re: [GENERAL] Fwd: parameter type is unknown error
Next
From: Günce Kaya
Date:
Subject: Re: [GENERAL] Fwd: parameter type is unknown error