Re: Recursive use

Поиск
Список
Период
Сортировка
От Adam Radlowski
Тема Re: Recursive use
Дата
Msg-id 4524A819.5020207@informatyka.gdansk.pl
обсуждение исходный текст
Ответ на Recursive use  (Alexander Burbello <burbello3000@yahoo.com.br>)
Список pgsql-admin
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
>
>


В списке pgsql-admin по дате отправления:

Предыдущее
От: K Prakash
Дата:
Сообщение: Unsubscribe
Следующее
От: Kevin Johnson
Дата:
Сообщение: Re: Disk space consumed by pk not returned after vacuum or reindex