Re: [SQL] CREATE RULE ON UPDATE/DELETE

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: [SQL] CREATE RULE ON UPDATE/DELETE
Дата
Msg-id Pine.BSF.4.21.0110210129570.41420-100000@megazone23.bigpanda.com
обсуждение исходный текст
Список pgsql-hackers
> Don't think so.  I think the rule doesn't make any sense.
> NEW.id and OLD.id are probably dbl values, so saying OLD.id=id (where id
> is raw.id since that's the update table) isn't correct.  It probably
> should be OLD.id=id*2 (which seems to work for me, btw)  It's editing
> a different row than the one that's being selected.

I forgot to mention in this that I needed to made an additional change in
the rule to make the ids come out correct at the end :(.  The update set
id=NEW.id should be id=NEW.id/2 of course...  Otherwise the +10 becomes a
+20.




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] CREATE RULE ON UPDATE/DELETE
Следующее
От: Bill Studenmund
Дата:
Сообщение: Re: Package support for Postgres