INSERT/UPDATE .. RETURNING

Поиск
Список
Период
Сортировка
От Protasov Vladimir
Тема INSERT/UPDATE .. RETURNING
Дата
Msg-id 606041294836076@web120.yandex.ru
обсуждение исходный текст
Список pgsql-sql
Hello everybody, 
I have the table (named for example "mytable") and trigger on insert. The trigger do the following (in real trigger the
logicis more complicated, but there is no difference for this question):
 
INSERT INTO another_table VALUES (NEW.*);
RETURN NULL;

And i want to do the following:
INSERT INTO "mytable" VALUES ('blah', 'blah', 'blah') RETURNING *;

But result is empty. I've tried to add rule on insert into "mytable" with returning clause, but there is the problem
withone: returning clause will not be invoked if insert returns nothing. But i really need return value for the
insert.
Any ideas?

-- 
Regards,
Vladimir Protasov.


В списке pgsql-sql по дате отправления:

Предыдущее
От: -
Дата:
Сообщение: Implement PostgreSQL full text search
Следующее
От: George Francis
Дата:
Сообщение: joining one record according to max value