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.96) (envelope-from ) id 1w5IeB-0036in-14 for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Mar 2026 07:27:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w5Ie9-00CeJ4-2M for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Mar 2026 07:27:22 +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.96) (envelope-from ) id 1w5Ie9-00CeIv-0l for pgsql-hackers@lists.postgresql.org; Wed, 25 Mar 2026 07:27:21 +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.98.2) (envelope-from ) id 1w5Ie7-00000000vdI-1zYt for pgsql-hackers@lists.postgresql.org; Wed, 25 Mar 2026 07:27:20 +0000 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-5a12c310e8aso4946110e87.3 for ; Wed, 25 Mar 2026 00:27:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774423637; cv=none; d=google.com; s=arc-20240605; b=lJNgTb3AuooiRxW9SXc32iDdWTuqq5msgsGDaf6RZPQHdamrqtBHSZ8vc3mrrJX1L9 3ERi+416qh9Z26zrge0OavRoxX9wBZswlZrf6tWi9MCOHeGctU7ZuyzMlwrDxmU2zRD+ OZIdZ95cqzfjQYD+zp1+cmpNMoZ6naLbjts6kShvXyiLhFZUq/zSu8TFv/EZNxBdeaMr /PSsrmgN8s6OzyFF7fV0Elgxjk2y6bLKrfe+ABW5jijhX9Q7ZhPsqPINtHKLeXLowpiW Zup+lk/Ren+89LaitPvgCJnkURTe306OgehUgiQi06/c0r0U8rXB555Lq0HsCer9n14j P1mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=F+KscJIn4Dx+hjbsFesSum78AdoBrsqHMkJex4Qsh68=; fh=Z0Wso8215d+bRFhxkx45LBjA/IM2NthKzZ+kMYZgoq4=; b=aKwAxfd+9pRiawefT/XZKlrkTR7ocfWU9CwBu+I276vomDYt6fmgBA2mHK0SO+BIYl riIMm0/0K+pknuKEXG/NUmu0OqJEWjiiBAY4Zz1BYdNM1p6ty8MDDfc2+kNhkg7aayXN rxci3+ovIY7fsVYlEutkrv2RLqzeiQie15lr+ycd6T85MzSz2meb5jTkRzGDN9s53FKs 4dS5AtYBIQXWRSchAsWXSdzTnV76X0gK2yVhd4uE8a+kckpvZxwBt8n3WPWBStUiXng0 n9k1GpvpN+CqOcvfT+xwYIiM7GEIFPIvqII5eDXJbKNLTco9K3S+75grNB65WpqjjPeR dLtQ==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeltef.nl; s=google; t=1774423637; x=1775028437; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=F+KscJIn4Dx+hjbsFesSum78AdoBrsqHMkJex4Qsh68=; b=oVZnkod0mFZus5j5rL+ROpMyD+i6rhju3jKzGdTzqw05GPnaE6uLdu/S2yxIQrI6ws /qSD1UTIcX6AsSmGdioI0K5Ld/wKGc3jzRAhWyE/EOUwXREt/hGU5FDwWxCH8O5GYaYV YaNp9V/e63EQwYRL37iXfCiF86ffw1A4d7YeAfGgKW4E0MWsMnfK1tyynoemkaCPDPx+ 83KdaI0xaliv2oYYlBXWHFbT3/Dk9o1i/U0NG9ds9Fixgj/UJwfsuGKLnDVo6b8EZzNS FdbdVvsbaK4FkSTAK8xKFAfd3Q00AxBfeQTvXDDxMx6UhEYTYP97DbTKc1dBERgdAndI 5TZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774423637; x=1775028437; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=F+KscJIn4Dx+hjbsFesSum78AdoBrsqHMkJex4Qsh68=; b=K9kZXvxeebDv0sAwQV0UDbrswPqEY+Xy8S1qv3E5grCZ7mYp8BF3umHiiERo7jgngN l9zqzmYepl08ZNxelClC/xW3Al1ENd9STDfFRWCVK/MX93zI1ePoqhxWyHkn1hlOO3GX m/bFQn7i6ak1mp8fELpOuCoDGLdlCkIr5Pdt2HaA90uZKAwaPsyhAxxAlSVy/9UEDNpr r+A+9gyDLtFVAz1DV5iVc4fMya44p3M/NE6wJTU8WKyh40M4Lgj/Jg8MdDRUkLWlsmid lpJT/7nt7EWHaghQqVOTvVtPmY+Hsqf1GHl+uEtTFn6sEOEWNWwVGOxJe22iapYv4Lb5 87xQ== X-Forwarded-Encrypted: i=1; AJvYcCUSAB+bx1S4Vl1QXfueKI1nkO75g8nSIPZ7MEAxESLk5071Izcgo3ve7gamPoWCPUO8XYBVgi2oJUdhqmGA@lists.postgresql.org X-Gm-Message-State: AOJu0YzrBCpJOmRrNxIW5TTo3GiHpuHw/A+/9GjgNNaqn/iZX0ZodL3U 2Vg57OaPzKqXqQyXd0AwSAHZbQ9mvfsnkDqN27g/0LyT7Dh7KNngxs89tnF3viePbhG+X01/LJp NZ3zyj6wxz53+9EhD9I0cYXMFruCBScbzgH2c8B9U3w== X-Gm-Gg: ATEYQzyevfla8yVZLHeDTqIy2Vfz/bItVY4FsrZ6gMKUWsgfxGw3giHdVvwfp0tImXT n2zyrnyrC2Y/1A1Qe7PF0Z+cTXuZZbxkftFV2zXloFBiW2NlUbaZ2pxv1htyKEoUpTFdiTVWBxB HgFX9VDFHfCxSDlnssVQ0Es716eTG9clemKEpF2NQd9I8Hfo4nk0zYS8XbwIBQg12qTHuahTirs 2hZCxVuiJpF03Bk30zvIG5eG/1wlgErQmYjpZ9k90NB/TW75NTrddsPex4f505LbO+vz823xSxl QeN6ytDMFDgxOBae5NsxkB/HR3psi7MLWcJE5iqyUa0MVdxF X-Received: by 2002:a05:6512:2313:b0:5a2:8239:412 with SMTP id 2adb3069b0e04-5a29b980b64mr976505e87.10.1774423637373; Wed, 25 Mar 2026 00:27:17 -0700 (PDT) MIME-Version: 1.0 References: <2155281.1767900170@sss.pgh.pa.us> <431484.1768433414@sss.pgh.pa.us> In-Reply-To: From: Jelte Fennema-Nio Date: Wed, 25 Mar 2026 08:27:05 +0100 X-Gm-Features: AaiRm52_szRzTS4I3SIOeeQJxKHeyoDEPAIMev2b3s5TjEFr94NfhE98k2CMlH4 Message-ID: Subject: Re: Proposal to allow setting cursor options on Portals To: Sami Imseih Cc: Dave Cramer , Hannu Krosing , Robert Haas , Tom Lane , Jacob Champion , PostgreSQL Hackers , Heikki Linnakangas Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 24 Mar 2026 at 21:54, Sami Imseih wrote: > All the cursor options can be passed, though CURSOR_OPT_BINARY is > irrelevant in the extended query protocol as noted here [1]. Binary output is > controlled by the result format codes on the FETCH instead. So, > CURSOR_OPT_BINARY can be passed as a cursor option, but will be > silently ignored. This is what this patch originally did in one of the earlier versions. And if I understand correctly it was changed after this feedback from me: On Sun, 14 Dec 2025 at 14:41, Jelte Fennema-Nio wrote: > As mentioned upthread, I'm not sure BINARY makes sense. For any other > options, the protocol docs should specify which ones are allowed and > what their bits are. Looking at the DECLARE docs[2]. > 1. I think supporting ASENSITVE/INSENSITIVE/SENSITIVE bits is > unnecessary, since postgres cursors are always INSENSITIVE. > 2. For SCROLL vs NO SCROLL, it would be nice if we could get rid of > the intermediate mode where if neither SCROLL or NO SCROLL is > specified, it's still SCROLL sometimes. I'm not sure backwards > compatibility would allow that, i.e. can you currently sometimes do a > BACKWARD scan on a portal created with Bind. I guess we could make it > so that if you specify the portal flags, then you have to be explicit > abuot specifying SCROLL or NO SCROLL > 3. All the flags with no SQL variant probably shouldn't be > configurable through the protocol too (e.g. CURSOR_OPT_FAST_PLAN)