RETURN in function - Mailing list pgsql-general

From Uros Gruber
Subject RETURN in function
Date
Msg-id 90441051448.20011101114909@sir-mag.com
Whole thread Raw
List 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


pgsql-general by date:

Previous
From: "Tille, Andreas"
Date:
Subject: Re: PostgreSQL dirver?
Next
From: richard@tortoise.demon.co.uk
Date:
Subject: news server?