RETURNING in stored procedure

From: "Mehrotra, Abhinav (GE Healthcare)" <Abhinav(dot)Mehrotra(at)ge(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: RETURNING in stored procedure
Date: 2009-05-22 09:06:24
Message-ID: 516FCC77ADD26141AF6F0EA95E0AA5645708EB@BANMLVEM04.e2k.ad.ge.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


Hi,

I have a table
temp (name varchar(64), seq bigserial)

And a stored procedure :

Create function ......
..........
Val bigint;
BEGIN:
Val:= insert into temp("hello") RETURNING seq;
END;

I am unable to assign the value returned by seq into val.

-Abhinav

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Leif B. Kristensen 2009-05-22 09:16:22 Re: RETURNING in stored procedure
Previous Message Jana 2009-05-21 22:53:25 Re: Custom sorting