From: | Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com> |
---|---|
To: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Found small issue with OUT params |
Date: | 2005-09-28 19:10:31 |
Message-ID: | 433AEAA7.1060004@amsoftwaredesign.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
consider this function:
CREATE OR REPLACE FUNCTION FIND_USER_SOCKET_BYNAME (
IN IN_USERNAME VARCHAR,
OUT OUT_SOCKET_ADDRESS INTEGER)
AS
$BODY$
BEGIN
select socket_address from userdata where fullname = in_username into
out_socket_address;
if out_socket_address is null then
out_socket_address = 0 ;
end if;
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE
If I call it like this:
select * from FIND_USER_SOCKET_BYNAME('juser');
I would expect to get back 1 value with the name of the OUT param
(OUT_SOCKET_ADDRESS).
However it comes back with the name of the function which I would expect
if I called it like this:
select FIND_USER_SOCKET_BYNAME('juser');
If I add another OUT value then the value comes back with the name of
the out param(plus the temp one I added) as expected.
It's easy enough to work around, but was not as expected.
Thanks,
Tony Caduto
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-09-28 19:46:59 | Re: Found small issue with OUT params |
Previous Message | Tom Lane | 2005-09-28 19:00:50 | Re: [PATCHES] Proposed patch for sequence-renaming problems |