Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group