recurrence in PL/pgSQL ??!!!!

From: Adam Walczykiewicz <adamwal(at)poczta(dot)onet(dot)pl>
To: pgsql-general(at)postgresql(dot)org
Subject: recurrence in PL/pgSQL ??!!!!
Date: 2001-08-05 08:20:07
Message-ID: 3B6D01B7.B011D8C@poczta.onet.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 ]

Browse pgsql-general by date

  From Date Subject
Next Message Karl DeBisschop 2001-08-05 13:54:01 Re: HELP! BUG? pg_dump mucks up grant/revoke
Previous Message Bruce Momjian 2001-08-04 17:18:00 Re: HELP! BUG? pg_dump mucks up grant/revoke