Thank to Terry I've tried to write rule instead of trigger but have
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...
pgsql-novice by date
|Next:||From: Tjibbe Rijpma||Date: 2005-01-17 13:33:41|
|Subject: Sql query as input variable in a PL/pgsql function?|
|Previous:||From: Prasanna Srinivasan Venkatasubramanian||Date: 2005-01-17 11:38:07|
|Subject: LOG: unexpected EOF on client connection|