Stored Procedure Problem

From: "Atul" <atul(at)imcindia(dot)net>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Stored Procedure Problem
Date: 2002-12-12 13:41:36
Message-ID: LHEOILFLDANINFJAGPEOEEFMCAAA.atul@imcindia.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

Atul Here, I have one problem while accessing Database
Records Or Recordset from stored procedure. Procedure is like this,

CREATE FUNCTION b_function() RETURNS int4 AS '
DECLARE
an_integer int4;
BEGIN
select emp_id from employee;
return an_integer;
END;
'
LANGUAGE 'plpgsql';

I create the procedure . After that I run the statement like

Test=#> select b_function();

Error comes like

Error: ERROR: SELECT query has no destination for result data.
If you want to discard the results, use PERFORM instead.
WARNING: Error occurred while executing PL/pgSQL function b_function
WARNING: line 4 at SQL statement

Also I use PERFORM statement. But still problem is not resolved.

Please Help me. I hope your kind co-operation.

Thanks.

Atul…

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Héctor Iturre 2002-12-12 13:43:32 Re: Stored Procedure Problem
Previous Message Christoph Haller 2002-12-12 13:37:33 Re: Stored Procedure Problem