agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Günce Kaya <guncekaya14@gmail.com>
Cc: Charles Clavadetscher <clavadetscher@swisspug.org>
Cc: pgsql-general@postgresql.org
Subject: Re: Fwd: parameter type is unknown error
Date: Mon, 06 Mar 2017 07:36:25 -0500
Message-ID: <7570.1488803785@sss.pgh.pa.us> (raw)
In-Reply-To: <CAAV2-mU4RAdASZ_bwvge=C481z9-Z2ttJEzp+8-KLcSd879arA@mail.gmail.com>
References: <CAAV2-mXSDs-hHVyeE7XWd4oSqM7MXQ7o2T+kyYBE2kgh6KmYJQ@mail.gmail.com>
	<CAAV2-mX-Kj377sA4bv_Gr+Zi2ZFynPtWiyUWSzSpRO=RxN+eYw@mail.gmail.com>
	<000401d29670$10e9d870$32bd8950$@swisspug.org>
	<CAAV2-mXrrn8NaF3X8VR0P7kQLA9eUzphe1Vv9acgon_S4VKsgw@mail.gmail.com>
	<CAAV2-mU4RAdASZ_bwvge=C481z9-Z2ttJEzp+8-KLcSd879arA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



view thread (14+ messages)  latest in thread

Message-ID: <7570.1488803785@sss.pgh.pa.us>
Permalink:  ../7570.1488803785@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7570.1488803785@sss.pgh.pa.us

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, guncekaya14@gmail.com, clavadetscher@swisspug.org, pgsql-general@postgresql.org
  Subject: Re: Fwd: parameter type is unknown error
  In-Reply-To: <7570.1488803785@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox