INSERT ... RETURNING in v8.2

Поиск
Список
Период
Сортировка
От Vincenzo Romano
Тема INSERT ... RETURNING in v8.2
Дата
Msg-id 200706121618.32613.vincenzo.romano@gmail.com
обсуждение исходный текст
Ответы Re: INSERT ... RETURNING in v8.2
Re: INSERT ... RETURNING in v8.2
Re: INSERT ... RETURNING in v8.2
Список 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 по дате отправления:

Предыдущее
От: rwickert@contextworld.com
Дата:
Сообщение: Re: PL/PGSQL rowtype return pr
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: INSERT ... RETURNING in v8.2