INSERT ... RETURNING in v8.2 - Mailing list pgsql-general

From Vincenzo Romano
Subject INSERT ... RETURNING in v8.2
Date
Msg-id 200706121618.32613.vincenzo.romano@gmail.com
Whole thread Raw
Responses Re: INSERT ... RETURNING in v8.2
Re: INSERT ... RETURNING in v8.2
Re: INSERT ... RETURNING in v8.2
List pgsql-general
Hi all.
I'm trying to use this wonderful feature (thanks to anyone who
suggested/committed/implemented it).

According to the documentation:
(http://www.postgresql.org/docs/8.2/interactive/sql-insert.html)

"The optional RETURNING clause causes INSERT to compute and return
value(s) based on each row actually inserted. This is primarily
useful for obtaining values that were supplied by defaults, such
as a serial sequence number. However, any expression using the
table's columns is allowed. The syntax of the RETURNING list is
identical to that of the output list of SELECT."

Well, at least on v8.2.4 I cannot return count(*), that is the
number of lines actually inserted into the table. Nor I can return
any aggregate function of them.

Am I doing anything wrong or is there some missing sentence in the
documentation?

--
Vincenzo Romano
--
Maybe Computer will never become as intelligent as Humans.
For sure they won't ever become so stupid. [VR-1988]

pgsql-general by date:

Previous
From: rwickert@contextworld.com
Date:
Subject: Re: PL/PGSQL rowtype return pr
Next
From: Martijn van Oosterhout
Date:
Subject: Re: INSERT ... RETURNING in v8.2