Re: How do I use returning in a view?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Karen Hill" <karen_hill22(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How do I use returning in a view?
Date: 2007-02-17 18:06:12
Message-ID: 20424.1171735572@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Karen Hill" <karen_hill22(at)yahoo(dot)com> writes:
> I have an updateable view (using rules) that I'm trying to improve by
> using 8.2's RETURNING feature to place the result of one insert into
> the next.

That's not what it's for. RETURNING in an insert rule is to define what
to return if someone does an INSERT/RETURNING *on the view*. It's
thrown away if the rule is invoked by a plain INSERT.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2007-02-17 18:08:00 Re: Addons
Previous Message Magnus Hagander 2007-02-17 17:48:39 Re: user input during runtime