Problems with rules
От | pgsql-bugs@postgresql.org |
---|---|
Тема | Problems with rules |
Дата | |
Msg-id | 200011140920.eAE9Ktv66402@hub.org обсуждение исходный текст |
Ответы |
Re: Problems with rules
|
Список | pgsql-bugs |
Carsten Zerbst (zerbst@tu-harburg.de) reports a bug with a severity of 2 The lower the number the more severe it is. Short Description Problems with rules Long Description The given code is destilled from a reallife DB. All attempts to define a rule which automatically updates the column aenderungsdatumfrom table mitglieder on updates failed. The result was every time psql:ruleerror:17: ERROR: query rewritten 10 times, may contain cycles Sample Code DROP TABLE "mitglieder"; CREATE TABLE "mitglieder" ( "mitid" int4 PRIMARY KEY, "name" character varying(100) NOT NULL, "vorname" character varying(100), "aenderungsdatum" date DEFAULT 'now' ); INSERT INTO "mitglieder" (mitid, name, vorname) VALUES (42,'Surname','firstname'); DROP RULE "test"; CREATE RULE "test" AS ON UPDATE TO "mitglieder" WHERE OLD.name <> NEW.name DO UPDATE "mitglieder" SET "aenderungsdatum" = 'now' ; UPDATE "mitglieder" SET name='Nachname' where mitid=42; No file was uploaded with this report
В списке pgsql-bugs по дате отправления: