recurrence in PL/pgSQL ??!!!! - Mailing list pgsql-general

From Adam Walczykiewicz
Subject recurrence in PL/pgSQL ??!!!!
Date
Msg-id 3B6D01B7.B011D8C@poczta.onet.pl
Whole thread Raw
List pgsql-general
Hi,

I have a table t_categories(nr serial, nr_up integer,name text, ....)
nr_up is a number of category which is one point up to the inserted
category.

and second table t_category_search(nr_ins integer,nr_up)

I try to write Pl/pgsql function using recurrence ....
It should start on insert to t_categories ... (trigger), and create new
rows in t_category_search  :

for_example :  if there is the structure   c1 -----> c2 ----> c3
and I want to create c4 which should be located directly under c3, so  I
want to get in t_category_search

(0,c4),    #0 is the number of max top abstraction category
(c4,c4)
(c4,c1)
(c4,c2)
(c4,c3)

It is possible to use recurrence in PL/pgsql to make such trigger or
there is somo other way to make it on PL/pgsql
Thanks in advance
Adam



--

Jest niezly ... i liscik napisze
OnetKomunikator [ http://ok.onet.pl/instaluj.html ]


pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: HELP! BUG? pg_dump mucks up grant/revoke
Next
From: Karl DeBisschop
Date:
Subject: Re: HELP! BUG? pg_dump mucks up grant/revoke