rules ON INSERT

Поиск
Список
Период
Сортировка
От Ralph Heinkel
Тема rules ON INSERT
Дата
Msg-id 200411021722.19226.ralph@strubi.ox.ac.uk
обсуждение исходный текст
Список pgsql-bugs
Hi,

thanks to everybody who has answered to my question. Indeed the documents
let the programmer hope that s/he gets what should be expected:

In postgresql-7.4.1/doc/html/rules-update.html it says:
    For ON INSERT rules, the original query (if not suppressed by INSTEAD)
    is done before any actions added by rules. This allows the actions to
    see the inserted row(s).

The relevant part is "to see the inserted row(s)". This is really misleading
if in reality something else (like a macro as I've learned now) is executed.

My naive question is: Would it really be a lot of work in the postgres
code to actually return the results instead of executing the macro?
Then the postgres world would be simpler again and everybody could
just use rules without having so separate two cases:
1. Rules ON INSERT work without 'serials'
2. Rules ON INSERT don't work with 'serials', use triggers instead.

Thanks,

Ralph

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

Предыдущее
От: "Laferriere, Al"
Дата:
Сообщение: Re: 8.0 beta4: Exception when including catalog qualifier in SELECT from
Следующее
От: kael@canada.com
Дата:
Сообщение: Possible bug: pg_hba.conf file