Re: Recursive use

From: "Aaron Bono" <postgresql(at)aranya(dot)com>
To: "Alexander Burbello" <burbello3000(at)yahoo(dot)com(dot)br>
Cc: "Lista Postgres" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Recursive use
Date: 2006-10-13 21:25:36
Message-ID: bf05e51c0610131425w5153b18wcdb09d84c3affdbc@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 10/4/06, Alexander Burbello <burbello3000(at)yahoo(dot)com(dot)br> wrote:
>
> Hi people,
>
> I need to know if Postgres do recursive search and how can I do!
> I will explain my problem.
>
>
> table COOPERATIVE
> code_cooperative int
> code_coo_father int
>
> I can have 3 level by business rules
>
> 1 - Father
> ----- 2 - Children
> --------- 3 - Grandchildren
>
>
> I would like to have a query asking who is father and granfather
> select grandfather, father from COOPERATIVE where COD_COOPERATIVE = 3
>
> Do the Postgres can solve this problem?
> Could anybody help me?

I see this question every few months.

Check out this post:
http://archives.postgresql.org/pgsql-sql/2001-11/msg00438.php

--
==================================================================
Aaron Bono
Aranya Software Technologies, Inc.
http://www.aranya.com
http://codeelixir.com
==================================================================

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Aaron Bono 2006-10-13 21:45:18 Re: Copying data from table to table (cloned tables)
Previous Message Chris Browne 2006-10-13 19:30:07 Re: postgres in HA constellation