function parameters/output values

From: "Thomas Leavitt" <thomas(dot)leavitt(at)clickrebates(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: function parameters/output values
Date: 2000-01-12 10:29:47
Message-ID: NDBBLIDGKLINCGOKPFFKKEFLCKAA.thomas.leavitt@clickrebates.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I would like to know if function parameters are used to pass output values
back to the function.

e.g.

create function func1(p1 varchar,p2 varchar OUTPUT, p3 varchar OUTPUT)
BEGIN
SELECT p1 = t.foo1, p3 = t.foo2
FROM test_table t
WHERE foo3 = p1
END

DECLARE p2 varchar(50), p3 varchar(50)
CALL func1('abc',@p2 out,@p3 out)
PRINT @p2
PRINT @p3
--
Thomas Leavitt -- thomas(dot)leavitt(at)clickrebates(dot)com; 408-591-3342
Co-Founder/COO, ClickRebates.Com, Inc. (www.clickrebates.com)
Get Paid What You're Worth!

Sign up for our pre-launch guest list and refer your friends!

Or use our working prototype at www.clickrebates.org to "Surf for a Higher
Cause" (earn money for charity)

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message admin 2000-01-12 12:12:07 stats on select
Previous Message Thomas Leavitt 2000-01-12 10:10:36 simple question