agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: wei.liang@eudoramail.com
Cc: pgsql-sql@postgresql.org
Subject: Re: calling function
Date: Thu, 04 Mar 2004 01:40:51 -0500
Message-ID: <22336.1078382451@sss.pgh.pa.us> (raw)
In-Reply-To: <HJIPBHMLGOCCGAAA@whowhere.com>
References: <HJIPBHMLGOCCGAAA@whowhere.com>
"William Anthony Lim" <wei.liang@eudoramail.com> writes:
> create or replace function testcall(int4,varchar,bool,int2) return setof record as '
> ...
> select * from testcall(12,'ABCD',true,20000);
> ERROR: function testcall(integer, "unknown", boolean, integer) does not exist
An undecorated integer constant is considered int4 (or int8 or numeric
if large enough), and there's no automatic downcast to int2. You could
write 20000::int2 or some such, but on the whole I'd recommend declaring
the function to take int4 not int2.
regards, tom lane
view thread (3+ messages) latest in thread
Message-ID: <22336.1078382451@sss.pgh.pa.us>
Permalink: ../22336.1078382451@sss.pgh.pa.us/
Also on: postgresql.org/message-id/22336.1078382451@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, wei.liang@eudoramail.com
Subject: Re: calling function
In-Reply-To: <22336.1078382451@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