Thread
-
Multiple sets of results from recursive query
Shaozhong SHI <shishaozhong@gmail.com> — 2023-07-16T10:40:52Z
Has anyone come across multiple sets of results with recursive query? How to handle it? Regards, David
-
Re: Multiple sets of results from recursive query
Greg Sabino Mullane <htamfids@gmail.com> — 2023-07-17T16:43:09Z
What exact problem are you trying to solve? Recursive CTEs return one row per internal invocation, so they already return a "set" of results, but you could use arrays or json if you wanted to pack in extra information per returned row. On Sun, Jul 16, 2023 at 6:41 AM Shaozhong SHI <shishaozhong@gmail.com> wrote: > Has anyone come across multiple sets of results with recursive query? > > How to handle it? > > Regards, > > David >
-
Re: Multiple sets of results from recursive query
Shaozhong SHI <shishaozhong@gmail.com> — 2023-07-17T19:21:54Z
On Monday, 17 July 2023, Greg Sabino Mullane <htamfids@gmail.com> wrote: > What exact problem are you trying to solve? Recursive CTEs return one > row per internal invocation, so they already return a "set" of results, but > you could use arrays or json if you wanted to pack in extra information per > returned row. > > On Sun, Jul 16, 2023 at 6:41 AM Shaozhong SHI <shishaozhong@gmail.com> > wrote: > >> Has anyone come across multiple sets of results with recursive query? >> >> How to handle it? >> > Surely, there must be possible to find all route paths. Regards, David
-
Re: Multiple sets of results from recursive query
Erik Brandsberg <erik@heimdalldata.com> — 2023-07-17T19:31:08Z
A quick google provides content that may help: https://www.sisense.com/blog/postgres-recursive-cte/ The issue is that you aren't asking a specific question with a well defined answer. Provide examples of your data and what you are trying to achieve for the best results in a forum like this. On Mon, Jul 17, 2023 at 3:22 PM Shaozhong SHI <shishaozhong@gmail.com> wrote: > > > On Monday, 17 July 2023, Greg Sabino Mullane <htamfids@gmail.com> wrote: > >> What exact problem are you trying to solve? Recursive CTEs return one >> row per internal invocation, so they already return a "set" of results, but >> you could use arrays or json if you wanted to pack in extra information per >> returned row. >> >> On Sun, Jul 16, 2023 at 6:41 AM Shaozhong SHI <shishaozhong@gmail.com> >> wrote: >> >>> Has anyone come across multiple sets of results with recursive query? >>> >>> How to handle it? >>> >> > Surely, there must be possible to find all route paths. > > Regards, David >
-
Re: Multiple sets of results from recursive query
Shaozhong SHI <shishaozhong@gmail.com> — 2023-07-17T19:43:51Z
On Monday, 17 July 2023, Erik Brandsberg <erik@heimdalldata.com> wrote: > A quick google provides content that may help: https://www.sisense. > com/blog/postgres-recursive-cte/ > > The issue is that you aren't asking a specific question with a well > defined answer. Provide examples of your data and what you are trying to > achieve for the best results in a forum like this. > > On Mon, Jul 17, 2023 at 3:22 PM Shaozhong SHI <shishaozhong@gmail.com> > wrote: > >> >> >> On Monday, 17 July 2023, Greg Sabino Mullane <htamfids@gmail.com> wrote: >> >>> What exact problem are you trying to solve? Recursive CTEs return one >>> row per internal invocation, so they already return a "set" of results, but >>> you could use arrays or json if you wanted to pack in extra information per >>> returned row. >>> >>> On Sun, Jul 16, 2023 at 6:41 AM Shaozhong SHI <shishaozhong@gmail.com> >>> wrote: >>> >>>> Has anyone come across multiple sets of results with recursive query? >>>> >>>> How to handle it? >>>> >>> >> Surely, there must be possible to find all route paths. >> >> Regards, David >> > This one falls short of explaining possible other routes in network. http://blog.cleverelephant.ca/2010/07/network-walking-in-postgis.html Regards, David