Search Postgresql Archives

Re: recursion in plpgsql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Tue, Nov 6, 2018 at 2:54 PM David Gauthier <davegauthierpg@xxxxxxxxx> 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 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux