Recursive plpgsql function in rule

From: mito <milos(dot)orszag(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Recursive plpgsql function in rule
Date: 2009-04-19 11:08:43
Message-ID: gsf0no$1e8p$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I am trying to select subtree by parent id in table:

create table categories(
id int,
parent_id int
);

I am fetching it by recursive plpgsql function, which works well.

When i use that function as part of rule operation, i am getting ERROR:
stack depth limit exceeded.

I have tried to rewrite without recursion which cause infinite loop in rule.

Is it possible to sent dynamic structures in planer?
Or how to fetch subtree without change of table structure inside rule?

Thanks

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message mito 2009-04-19 11:57:20 Reference on partial data
Previous Message KaiGai Kohei 2009-04-19 08:21:42 Re: [PATCH] unalias of ACL_SELECT_FOR_UPDATE