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 1qLRKC-0037TJ-Rs for pgsql-sql@arkaria.postgresql.org; Mon, 17 Jul 2023 16:43:52 +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 1qLRKA-00CJxZ-En for pgsql-sql@arkaria.postgresql.org; Mon, 17 Jul 2023 16:43:50 +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 1qLRKA-00CJx2-64 for pgsql-sql@lists.postgresql.org; Mon, 17 Jul 2023 16:43:50 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qLRK7-000vzI-Fy for pgsql-sql@lists.postgresql.org; Mon, 17 Jul 2023 16:43:48 +0000 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4fb96e2b573so7637260e87.3 for ; Mon, 17 Jul 2023 09:43:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689612226; x=1692204226; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=mhi4YCN1jUAmHDO7I3YKaqN23H/TfZn89ql7j36hBac=; b=NBtRxKjlq1f7gcIN7DSBFoqXcPHeJgjpbBpoj6B7Kq9yy6pZy5obJp2ZRe4/nEwgHH r7Sz17QtgHqPKowL9I4O6XE2sxpVWtF0KrIdUdtlMY7ynY92v+FS9PCLLvYaTGmEcSbX 9lZu78KmFjxSOSZ/AJlMdMSo/x/3D3yE3pVF7KDHlT1Uv+9yOUyV/zuAfzkNZclqQUfG 0WDsyC7uyNfWp6H8mk0TMTucaSO4C5vFQWOoFVURZxD7hBO9lc33S1E7bxUDbfm6lS3I Xg4xzElWGj1MuZfUODMWUzm6kSWe9k+Vl+zVH0y8hwkFpYYQtwjZNDwWhUQWBh8hBw4+ +HpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689612226; x=1692204226; 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=mhi4YCN1jUAmHDO7I3YKaqN23H/TfZn89ql7j36hBac=; b=YaLMb4zd1pXfyUdD86OXInsaM2CuGaYS7GcyezsHMVESGkASBn6sCwnTcuvrnck1FF M3Mbh/GR3XydhX7EaWpXO3/BGpDZIP0yYuTodozfpDKyKW9HOI2v822r9Vz/5bPbj79P gFrmqip4mm93cmfqiahreOcVWi5xnGLsE6/EuSg2+PaLjygPY59kdiRfFb4NeM+hHUwx IF0dyKUOWNDtfoshWM73kPvlj+CfZr55VD1nwgjd65vYIr5rzN2jXWK4AEG41kWBGXKh csSGvNd+vM3wXv9XbxpY7xnB7QGvSUZT1hMAPX71mk+Rdg/DQtqjfuTZIOKFhAo8stej WOzw== X-Gm-Message-State: ABy/qLbCbeseK0ua7NFJ46Sm2rmE+4Lbpf5se71MLRn0SBqtlwEAKNZu TUuHrJ6fhNonR11rYY/wf+jCd+K+NxSW7ia6WmY= X-Google-Smtp-Source: APBJJlFAS8Lava7NlNO7/pAM9c0ZtiAJtf4hxuMc1J3bGGRstocUwx4kj6tp9SLbfvlmSwXhWxIu5Lwli+qhnU5m/sk= X-Received: by 2002:ac2:4642:0:b0:4f9:5592:7450 with SMTP id s2-20020ac24642000000b004f955927450mr8787860lfo.23.1689612225516; Mon, 17 Jul 2023 09:43:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Greg Sabino Mullane Date: Mon, 17 Jul 2023 12:43:09 -0400 Message-ID: Subject: Re: Multiple sets of results from recursive query To: Shaozhong SHI Cc: pgsql-sql Content-Type: multipart/alternative; boundary="0000000000008297d90600b180a2" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000008297d90600b180a2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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? > > Regards, > > David > --0000000000008297d90600b180a2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
What exact problem are you trying to solve? Recursive CTEs= return one row=C2=A0per internal invocation, so they already return a &quo= t;set" of results, but you could use arrays or json if you wanted to p= ack in extra information per returned row.

On Sun, Jul 16, 2023 at 6:41=E2= =80=AFAM Shaozhong SHI <shisha= ozhong@gmail.com> wrote:
Has anyone come across multiple sets of re= sults with recursive query?

How to handle it?
=
Regards,

David
--0000000000008297d90600b180a2--