Re: recursion in plpgsql

Поиск
Список
Период
Сортировка
От Steve Crawford
Тема Re: recursion in plpgsql
Дата
Msg-id CAEfWYyzaS1nXsJTS3yr1UsMZYxBucGhL1Lc+2NyuV-KJHmGbqQ@mail.gmail.com
обсуждение исходный текст
Ответ на recursion in plpgsql  (David Gauthier <davegauthierpg@gmail.com>)
Список pgsql-general


On Tue, Nov 6, 2018 at 2:54 PM David Gauthier <davegauthierpg@gmail.com> wrote:
Hi:

I'm trying/failing to write a recursive plpgsql function where the function tries to operate on a hierary of records in a reflexive table.  parent-child-grandchild type of recursion.

I tried with a cursor, but got a "cursor already in use" error.  So that looks like scoping. 

I know I did this sort of thing in the past, but I can't remember if I used cursors or some other construct to traverse the hierarchy.

Recursive common-table-expression queries would be the typical way. Perhaps that's what you used before


Cheers,
Steve 

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

Предыдущее
От: David Gauthier
Дата:
Сообщение: recursion in plpgsql
Следующее
От: Tom Lane
Дата:
Сообщение: Re: recursion in plpgsql