RETURN in function

From: Uros Gruber <uros(at)sir-mag(dot)com>
To: postgres-general <pgsql-general(at)postgresql(dot)org>
Subject: RETURN in function
Date: 2001-11-01 10:49:09
Message-ID: 90441051448.20011101114909@sir-mag.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

I wan't to know how to use SET type in RETURNING from function.

I have some function and i want to return 2 values. 1 value is return
code and other is some ID if return code is for example 1.

For example:

Function checks users data. Return code is possible like 1 for
everything is OK and 0 for error. But other value can be like ID is
return code is 1, but if return code is 0 i want to return also what
error is this.

I tried with REISE NOTICE, but this i can't use in PHP (or am I,
please give me example), so i want return 2 values. I tried to use

CREATE FUNCTION ... RETURNS SET AS .... but i have syntax error near
SET.


I hope everybody understands me what i want to know. Thanks for help
--
bye,
Uros

Browse pgsql-general by date

  From Date Subject
Next Message Tille, Andreas 2001-11-01 10:50:01 Re: PostgreSQL dirver?
Previous Message Tom Lane 2001-11-01 05:28:25 Re: user authentication crash by Erik Luke (20-08-2001; 1.3kb)