From: Adam Radlowski <adamr@informatyka.gdansk.pl>
To: Alexander Burbello <burbello3000@yahoo.com.br>
Cc: Lista Postgres <pgsql-admin@postgresql.org>
Subject: Re: Recursive use
Date: Thu, 05 Oct 2006 08:37:13 +0200
Message-ID: <4524A819.5020207@informatyka.gdansk.pl> (raw)
In-Reply-To: <4523B23A.3000506@yahoo.com.br>
References: <4523B23A.3000506@yahoo.com.br>
I think it is not administration thing, but SQL language problem.
PostgreSQL is SQL92 compatible and has many very good and useful addons.
Generally, PostgreSQL gives You tools to analyze all, what You want,
when You hava data in tables.
You've explained in to short way You problem. The best is for example,
to give example project of tables, relations and their contents. Without
this I must build taht's all personally.
I suppose, You have to use construction:
select .... from (select ...) as foo;
or You can use views
or use cursor - first learn a little bit PLPGSQL language - it's very
simple and it is the best way; You can build with PLPGSQL the function,
what can return the result for You.
All about PosgreSQL SQL implementation and PGPLSQL You can find in
PostgreSQL doc's. I think it is very good written.
Greetings
Adam
Alexander Burbello 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?
>
> Thank you
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: adamr@informatyka.gdansk.pl, burbello3000@yahoo.com.br
Subject: Re: Recursive use
In-Reply-To: <4524A819.5020207@informatyka.gdansk.pl>
References: <4523B23A.3000506@yahoo.com.br> <4524A819.5020207@informatyka.gdansk.pl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox