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 1rtqUM-000Gvx-Qt for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Apr 2024 15:00:51 +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 1rtqUL-0089Aq-Ur for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Apr 2024 15:00:49 +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 1rtqTe-008613-5J for pgsql-hackers@lists.postgresql.org; Mon, 08 Apr 2024 15:00:06 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rtqTb-001qH6-PQ for pgsql-hackers@postgresql.org; Mon, 08 Apr 2024 15:00:04 +0000 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-516d3776334so4273549e87.1 for ; Mon, 08 Apr 2024 08:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712588402; x=1713193202; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=2Nn5JFkWYbspQHWEW5hPFqe7PbaBcmje/Ke+tEeuhVs=; b=Is/qEUcG9yqngZFMQ5lW+ZvZga76oqcnqnONEKmX6hThak2qxs3G3Pl2y/7b8KedJS hEgCQphh8kfLJWuVBW/mzMHflKc9ovVj971hlajjwFPjy4IKeskNe9ogCEyeXWSczbdM Q5POFxel4z6KLrjJ7Fd/dGx+gJIu3IUa0oxUPH+e9jW63zsYK1liJUJYb+npF3dddl+9 JGe+nzCuY+yDGzT3pOjXh/XCZyuArZedTyEaxXNjphgctGJqA3uuWOQc4ZGC9sEDj64V 3DYxu71rUXkhhX7y+YrcgGq/Vu3VEmjrpthYMV/zrTgqOcZuG1tw8SUyHFcI0pAqKdw8 ImIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712588402; x=1713193202; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2Nn5JFkWYbspQHWEW5hPFqe7PbaBcmje/Ke+tEeuhVs=; b=e6hLiJ5GTEm83MRFI6Ch31g+a9m1xhPgwM64+m9mKfnRkt9JlVobVQMsB75cQGWAfE Bqi11jBU7CwD3g8UVS1am89+1ybR7CuYQ7y4zFHxmE2zJkw0PxoNvKJKPGYfdLgGC3E5 hGRLp4trlzK27soc/WPv/5WtbWUjecwcrbFQF5w23V07KACuBLy3ZEuBbHJE6NG5bXHE Uf4Z6nqg6BOOu8jXgmMaUi3KVW3ZGG7LTfSlkhm5GqZNrz5/aOqU3rEn0KmxW2MvvV2X HcL/BOnfnWYZLgC5Da6UZSqZMwUk0B/FOmgLpChbu1lXova1Pg323WeofxEh5HZHWQhb Y0Mg== X-Forwarded-Encrypted: i=1; AJvYcCVa/nYgzSNwyISpPRMzZwWXsKKx74/t62GjiP5A1mBKFyuyAVxwckKSQpzlKeN++mOFY2m9fNIT5+d4nbPp+pG8LheJz/CVWosyGf2S X-Gm-Message-State: AOJu0YzTHXWoIP8NywKIArQjPMsrOL+/rC/WImekAaRHfKmjy3UmRNey hhpgOtXbOCeY9ohizKaNOb3zB5jEdh6vXEJlhLRUnGsnBoIlfOfj X-Google-Smtp-Source: AGHT+IEwZRwffszrOWPpJvF+TC9WG7seh+fT4qPe7y9chvic+DDL8vE115KWn2CLK6moxVvUOBsOjg== X-Received: by 2002:a05:6512:224d:b0:516:d16e:9059 with SMTP id i13-20020a056512224d00b00516d16e9059mr7095952lfu.42.1712588401967; Mon, 08 Apr 2024 08:00:01 -0700 (PDT) Received: from [1.0.0.7] ([178.155.25.248]) by smtp.gmail.com with ESMTPSA id d24-20020ac25458000000b00516cd089e29sm1204512lfn.151.2024.04.08.08.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Apr 2024 08:00:01 -0700 (PDT) Message-ID: <0023bea5-79c0-476e-96c8-dad599cc3ad8@gmail.com> Date: Mon, 8 Apr 2024 18:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs Content-Language: en-US To: Daniel Verite , Tom Lane Cc: Laurenz Albe , PostgreSQL Hackers , Robert Haas , Jakub Wartak References: <10117fba-890b-46ac-9316-cae83108a6a6@manitou-mail.org> From: Alexander Lakhin In-Reply-To: <10117fba-890b-46ac-9316-cae83108a6a6@manitou-mail.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Daniel and Tom, 08.04.2024 17:25, Daniel Verite wrote: > >> So I whacked the patch around till I liked it better, and pushed it. > Thanks for taking care of this! Now that ExecQueryUsingCursor() is gone, it's not clear, what does the following comment mean:?    * We must turn off gexec_flag to avoid infinite recursion.  Note that    * this allows ExecQueryUsingCursor to be applied to the individual query    * results. Shouldn't it be removed? Best regards, Alexander