Search Postgresql Archives

Re: infinite recursion detected in rules for relation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux