Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qLTwO-003FEb-Nk for pgsql-sql@arkaria.postgresql.org; Mon, 17 Jul 2023 19:31:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qLTwN-00E62O-2q for pgsql-sql@arkaria.postgresql.org; Mon, 17 Jul 2023 19:31:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qLTwM-00E62F-O0 for pgsql-sql@lists.postgresql.org; Mon, 17 Jul 2023 19:31:26 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qLTwF-000xJi-Qg for pgsql-sql@lists.postgresql.org; Mon, 17 Jul 2023 19:31:25 +0000 Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-262e81f6154so2369412a91.2 for ; Mon, 17 Jul 2023 12:31:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heimdalldata.com; s=google; t=1689622279; x=1690227079; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pceOj7LjPHYofpDOMmKJb7+9tSNDY13RbI6R/AntHnQ=; b=shKuXPf3/eds+gvbotufCMwI3NPSqPvdSdDJAisWvlwwfzVisYsyOdQXcfgpxJZOnW 1RnTMv7AMqgFD70q00TuU65YWgl8NPicLWYruePZNulBw2AkbHFo0TbitlKUreObPYES tpGJrZyteir/JjyqhMCpS/vLbVKw+Ulnlu0ZU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689622279; x=1690227079; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pceOj7LjPHYofpDOMmKJb7+9tSNDY13RbI6R/AntHnQ=; b=OZTGuGhWIMBdnCmlCFFUmnEkH4rYz9UmaKEVs94XdyVH7kXqBOZuW2Cc7CMo5U+Fb2 73Ce7n4+j9tpfEZf6B0ysN+nBeC6O4/qTyx1itzmacjaxFjEqCV9Of66EB5ygWRKdajH m7DWbV7rxWujleBQu+i996c1wIE533bF1WF4FRulv8cIJpkX4z6LkvmSmxtqGe8zP/k+ EakJBmcDRm9hDbouNU2922tbley2+WGd0NEApbwHi8x5YbpKMP2wJae/rI5TlgarqSnP EwgF2dNjpSObh7BR6qQSABhojwWdqmWhpVG4bW0fITq6HFJtLQFqiC58jP7Mr9obXw0i 2hgA== X-Gm-Message-State: ABy/qLZNj6CfT3B4Cf1dmIZweesA/cFmKQH5GzsP4Ha9E6rBdphgnUuW QyCBX9/iergGY3f/A0Op0o14ley0mNr/8NbGMcwt+g== X-Google-Smtp-Source: APBJJlFeqxPubQHHKxyKsGuHTOQwu9P9MbsZLEUUzJKDRePVKnv+lHpRvWqd3P62q7Sp1BTXsy/psLXzg2gOeVKz/+w= X-Received: by 2002:a17:90a:7e98:b0:25e:d303:b710 with SMTP id j24-20020a17090a7e9800b0025ed303b710mr9649850pjl.35.1689622278837; Mon, 17 Jul 2023 12:31:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Erik Brandsberg Date: Mon, 17 Jul 2023 15:31:08 -0400 Message-ID: Subject: Re: Multiple sets of results from recursive query To: Shaozhong SHI Cc: Greg Sabino Mullane , pgsql-sql Content-Type: multipart/alternative; boundary="000000000000bc2f030600b3d7ff" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000bc2f030600b3d7ff Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=E2=80=AFPM Shaozhong SHI wrote: > > > On Monday, 17 July 2023, Greg Sabino Mullane 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=E2=80=AFAM Shaozhong SHI >> wrote: >> >>> Has anyone come across multiple sets of results with recursive query? >>> >>> How to handle it=EF=BC=9F >>> >> > Surely=EF=BC=8C there must be possible to find all route paths. > > Regards, David > --000000000000bc2f030600b3d7ff Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
A quick google provides content that may = help:=C2=A0=C2=A0https://www.sisense.com/blog/postgres-recursive-cte/

The issue is that you aren't asking a specifi= c question=C2=A0with a well defined answer.=C2=A0 Provide examples of your = data and what you are trying to achieve for the best results in a forum lik= e this.=C2=A0=C2=A0

On Mon, Jul 17, 2023 at 3:22=E2=80=AFPM 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=C2=A0per int= ernal 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=E2=80=AFAM Shaozhong SHI <<= a href=3D"mailto:shishaozhong@gmail.com" target=3D"_blank">shishaozhong@gma= il.com> wrote:
Has anyone come across multiple sets of results with= recursive query?

How to handle it=EF=BC=9F
<= /blockquote>

Surely=EF=BC=8C there mu= st be possible to find all route paths.

Regards, D= avid=C2=A0
--000000000000bc2f030600b3d7ff--