Re: infinite recursion detected in rules for relation

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: infinite recursion detected in rules for relation
Дата
Msg-id 1423762092664-5837700.post@n5.nabble.com
обсуждение исходный текст
Ответ на infinite recursion detected in rules for relation  (pinker <pinker@onet.eu>)
Список 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.


В списке pgsql-general по дате отправления:

Предыдущее
От: John McKown
Дата:
Сообщение: Re: infinite recursion detected in rules for relation
Следующее
От: "Day, David"
Дата:
Сообщение: segmentation fault postgres 9.3.5 core dump perlu related ?