Re: Common question: what's wrong - Mailing list pgsql-novice

From Adie
Subject Re: Common question: what's wrong
Date
Msg-id 55706.213.77.90.234.1105964543.squirrel@klub.chip.pl
Whole thread Raw
In response to Common question: what's wrong  (przygoda@klub.chip.pl)
List pgsql-novice
Thank to Terry I've tried to write rule instead of trigger but have
another problem.

CREATE RULE g_oferty_id_oferty_rule AS ON INSERT TO g_oferty WHERE
(new.id_oferta IS NULL) DO INSTEAD INSERT INTO g_oferty (id_oferta, ...)
VALUES (DEFAULT, new.d..);

But got ' infinite recursion detected in rules for relation "g_oferty" '
error. The second insert should not fire this Rule...


Martin

pgsql-novice by date:

Previous
From: Prasanna Srinivasan Venkatasubramanian
Date:
Subject: LOG: unexpected EOF on client connection
Next
From: "Tjibbe Rijpma"
Date:
Subject: Sql query as input variable in a PL/pgsql function?