Re: Fwd: parameter type is unknown error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Günce Kaya <guncekaya14(at)gmail(dot)com>
Cc: Charles Clavadetscher <clavadetscher(at)swisspug(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Fwd: parameter type is unknown error
Date: 2017-03-06 12:36:25
Message-ID: 7570.1488803785@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

=?UTF-8?Q?G=C3=BCnce_Kaya?= <guncekaya14(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Günce Kaya 2017-03-06 12:36:56 Re: Fwd: parameter type is unknown error
Previous Message Charles Clavadetscher 2017-03-06 12:22:07 Re: Fwd: parameter type is unknown error

Browse pgsql-sql by date

  From Date Subject
Next Message Günce Kaya 2017-03-06 12:36:56 Re: Fwd: parameter type is unknown error
Previous Message Charles Clavadetscher 2017-03-06 12:22:07 Re: Fwd: parameter type is unknown error