public inbox for [email protected]  
help / color / mirror / Atom feed
Multiple sets of results from recursive query
5+ messages / 3 participants
[nested] [flat]

* Multiple sets of results from recursive query
@ 2023-07-16 10:40  Shaozhong SHI <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: Shaozhong SHI @ 2023-07-16 10:40 UTC (permalink / raw)
  To: pgsql-sql <[email protected]>

Has anyone come across multiple sets of results with recursive query?

How to handle it?

Regards,

David


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Multiple sets of results from recursive query
@ 2023-07-17 16:43  Greg Sabino Mullane <[email protected]>
  parent: Shaozhong SHI <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: Greg Sabino Mullane @ 2023-07-17 16:43 UTC (permalink / raw)
  To: Shaozhong SHI <[email protected]>; +Cc: pgsql-sql <[email protected]>

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 <[email protected]>
wrote:

> Has anyone come across multiple sets of results with recursive query?
>
> How to handle it?
>
> Regards,
>
> David
>


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Multiple sets of results from recursive query
@ 2023-07-17 19:21  Shaozhong SHI <[email protected]>
  parent: Greg Sabino Mullane <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: Shaozhong SHI @ 2023-07-17 19:21 UTC (permalink / raw)
  To: Greg Sabino Mullane <[email protected]>; +Cc: pgsql-sql <[email protected]>

On Monday, 17 July 2023, Greg Sabino Mullane <[email protected]> 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 <[email protected]>
> 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


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Multiple sets of results from recursive query
@ 2023-07-17 19:31  Erik Brandsberg <[email protected]>
  parent: Shaozhong SHI <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: Erik Brandsberg @ 2023-07-17 19:31 UTC (permalink / raw)
  To: Shaozhong SHI <[email protected]>; +Cc: Greg Sabino Mullane <[email protected]>; pgsql-sql <[email protected]>

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 <[email protected]>
wrote:

>
>
> On Monday, 17 July 2023, Greg Sabino Mullane <[email protected]> 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 <[email protected]>
>> 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
>


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Multiple sets of results from recursive query
@ 2023-07-17 19:43  Shaozhong SHI <[email protected]>
  parent: Erik Brandsberg <[email protected]>
  0 siblings, 0 replies; 5+ messages in thread

From: Shaozhong SHI @ 2023-07-17 19:43 UTC (permalink / raw)
  To: Erik Brandsberg <[email protected]>; +Cc: Greg Sabino Mullane <[email protected]>; pgsql-sql <[email protected]>

On Monday, 17 July 2023, Erik Brandsberg <[email protected]> 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 <[email protected]>
> wrote:
>
>>
>>
>> On Monday, 17 July 2023, Greg Sabino Mullane <[email protected]> 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 <[email protected]>
>>> 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


^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2023-07-17 19:43 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-07-16 10:40 Multiple sets of results from recursive query Shaozhong SHI <[email protected]>
2023-07-17 16:43 ` Greg Sabino Mullane <[email protected]>
2023-07-17 19:21   ` Shaozhong SHI <[email protected]>
2023-07-17 19:31     ` Erik Brandsberg <[email protected]>
2023-07-17 19:43       ` Shaozhong SHI <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox