Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group