Re: Common question: what's wrong

From: "Adie" <adie_xp(at)klub(dot)chip(dot)pl>
To: "PostgreSQL Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Common question: what's wrong
Date: 2005-01-17 12:22:23
Message-ID: 55706.213.77.90.234.1105964543.squirrel@klub.chip.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tjibbe Rijpma 2005-01-17 13:33:41 Sql query as input variable in a PL/pgsql function?
Previous Message Prasanna Srinivasan Venkatasubramanian 2005-01-17 11:38:07 LOG: unexpected EOF on client connection