Re: infinite recursion detected in rules for relation

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: infinite recursion detected in rules for relation
Date: 2015-02-12 17:28:12
Message-ID: 1423762092664-5837700.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

pinker wrote
> I wanted to set a rule:
> <pre>
> CREATE RULE "_RETURN" AS
> ON SELECT * from backend.test
> DO INSTEAD
> SELECT * FROM backend.test WHERE who='Me';
> </pre>
> When I'm trying to do anything on the table I get following error:
> <pre>
> ERROR: infinite recursion detected in rules for relation "backend.test"

Not surprising...

> Is there any way to avoid that? Maybe there exist some other approaches
> that could be useful ?

CREATE VIEW test_me AS
SELECT * FROM backend.test WHERE who = 'Me'
;

David J.

--
View this message in context: http://postgresql.nabble.com/infinite-recursion-detected-in-rules-for-relation-tp5837697p5837700.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Day, David 2015-02-12 21:21:55 segmentation fault postgres 9.3.5 core dump perlu related ?
Previous Message John McKown 2015-02-12 17:27:34 Re: infinite recursion detected in rules for relation