agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: William Anthony Lim <wei.liang@eudoramail.com>
To: pgsql-sql@postgresql.org
Subject: calling function
Date: Wed, 03 Mar 2004 22:29:07 -0800
Message-ID: <HJIPBHMLGOCCGAAA@whowhere.com> (raw)
Hi,
I have a little trouble. I'm newbie in postgresql.
Consider this function example:
create or replace function testcall(int4,varchar,bool,int2) return setof record as '
declare
r record;
a int4;
b varchar;
c bool;
d int2;
begin
a=$1;
b=$2;
c=$3;
d=$4;
for r in select * from "T_Customer" loop
return next r;
end loop;
return r;
end;'
language 'plpgsql'
when i tried to call it using:
select * from testcall(12,'ABCD',true,20000);
it says:
ERROR: function testcall(integer, "unknown", boolean, integer) does not exist
then I tried to change to:
select * from testcall(12,varchar'ABCD',true,20000);
it says:
ERROR: function testcall(integer, character varying, boolean, integer) does not exist
I've tried them using jdbc prepared statement and callable statement (both with/without parameters), but the result is the same.
what should i do?
Thanks
William
Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.com
view thread (3+ messages) latest in thread
Message-ID: <HJIPBHMLGOCCGAAA@whowhere.com>
Permalink: ../HJIPBHMLGOCCGAAA@whowhere.com/
Also on: postgresql.org/message-id/HJIPBHMLGOCCGAAA@whowhere.com
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: wei.liang@eudoramail.com
Subject: Re: calling function
In-Reply-To: <HJIPBHMLGOCCGAAA@whowhere.com>
* 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