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 1vUmMT-007SQN-2X for pgsql-hackers@arkaria.postgresql.org; Sun, 14 Dec 2025 13:42:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vUmMS-00D2vE-2K for pgsql-hackers@arkaria.postgresql.org; Sun, 14 Dec 2025 13:42:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vUmMS-00D2v6-1A for pgsql-hackers@lists.postgresql.org; Sun, 14 Dec 2025 13:42:09 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vUmMQ-000h60-0W for pgsql-hackers@lists.postgresql.org; Sun, 14 Dec 2025 13:42:08 +0000 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-37a2dced861so23419131fa.1 for ; Sun, 14 Dec 2025 05:42:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeltef.nl; s=google; t=1765719724; x=1766324524; 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=fJhdWp+E0OHuuGg8HqlsBx5GkPVIyshdH5i9/HfuM1Y=; b=g5y6sinVvTzrCwTcMtMhteibNXiORANWt8m1toFch595JafwFa4CihsSnSNEOkNVFz JIeaN5q3kVt4MA3pWTOMq9Yhg8jnZuWQOB3BeyOpq2MwAg8Q+6ElPssqT9to3AQmfPH6 3WTTLy5DLHZ6h6UFaA/0Nht6xg0RwFvaBYnj/918BWcy+rBv6idNtR5NpyHloJLTMKsQ vjyQTzKepgNK72qC/lNb4eOuqhamDq9Njg+FzeXhaG/YUItZcJfpSu7vT2cWWIz9i/IT C0iqYb0VnCF12TVV0G4FwlrNBxqvl3tTB9o9p1Dqm+0/R4ez6zwMI9XIVCO9hrwE00Wa WjiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765719724; x=1766324524; 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=fJhdWp+E0OHuuGg8HqlsBx5GkPVIyshdH5i9/HfuM1Y=; b=Z8MicU67qCsJtxAngz5ZL68SF/k+7oTcbK0wIYGdwlXAEB2cxvA0PPXoMKMBKWPm9i oVdKoBsQzCq3u4egVDyHtiEsA2lurf8t8ayB8lk3K0l6Dpd5R0SFovyzYjlr/pcUuOGe y66aWkadmkhSP+uLqIbvY2g79PedI7dIsj5LwTo7IoGXs/0Xj4+QEt5HiJj5vdWEMDwR 5B5epWVcjpUFvXTkjUi1BZrYKTtZ4lqB5UMFZ+8uO7VgvleqEvCfv0CNiXDAeJ6FsSaL 300Oxq2FN/zlvGcrIuwr9jBeQohIaz0TKOhGF1DtmcDRFQPbn8ubM7NMHESa7tnODa+4 a+OQ== X-Forwarded-Encrypted: i=1; AJvYcCVqXF/bF4gjLMovq8pcWb1Uz0kw+0EXG2qzJR6MeuvXL7Hs5yXBqnfds+DXq4ViW7jRnFEUqLrItLhi+ILd@lists.postgresql.org X-Gm-Message-State: AOJu0YxULkNguOAUfDsUZs9I727d0WCv1vHm7uQIUsBE9CJ+AwhyxOsU xNkl6ch6SHZur6oVZg7oz99pwomeqZBaVp/T1pXQCFyFi7GCEEV3VkT71GvV83C+9z05JFO+KcG 3LsE538bJ7DpVY5H8ydbXtU5khTzgAamiG6V5NzOfFg== X-Gm-Gg: AY/fxX7NCi1HXQzFEgMhBfigBXa9qD8/6DthbY2WQ3DRHXcamzZCSwo3UVxn9wsss7L IiK1cdOg1OiSDaTXQhAtMOEAc1J8KZ24LM3klE+OzGTuktjGy/jNFGVe2Cct+lCgxQA3G9YNaVV aC0R79RX1QUHITZXPcONsjXwTbGjsGbymycaae992rAVFuTi5h6t/TY5/+xWUiqdni/nEc5tMau qTcShE9dPjUR16qBBwF529swqrcqqG1gly0BUQekbbRwMdAd3iBI+2duQY9Rl1SzHkbcLZK X-Google-Smtp-Source: AGHT+IEtZl9iQAxkK/t+mBGHKIkmW5o3JNdBECQ7CPjMYIHPpWcJfWRaIh4jYTCVKBBWFnKKOqYAGZ2f9HMoe7aLRZ0= X-Received: by 2002:a05:651c:a08b:b0:37f:d634:ba27 with SMTP id 38308e7fff4ca-37fd634c55fmr14579381fa.9.1765719724199; Sun, 14 Dec 2025 05:42:04 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jelte Fennema-Nio Date: Sun, 14 Dec 2025 14:41:53 +0100 X-Gm-Features: AQt7F2qT6BkOOHykgVLl3-TksdSkBG-TuTY2ulup5YOEEPhJmB1R7Mn2-2LqLK8 Message-ID: Subject: Re: Proposal to allow setting cursor options on Portals To: Dave Cramer Cc: 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 Sun, 14 Dec 2025 at 13:31, Dave Cramer wrote: >> Exactly. Don't you want to make sure that clients in the ecosystem are >> able to use this _before_ we rev the version again, and again? We >> don't ever get these numbers back. > > Well there are 97 of them. 1 per year is a long time. I don't think Jacob was concerned about the actual numbers running out, but in case he was: it's actually 9997 versions that we still have (9996 after we'd commit the grease proposal[1]). [1]: https://commitfest.postgresql.org/patch/6157/ > FWIW, HOLDABLE cursors are not the only option this enables. It enables all of the other cursor options. 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) [2]: https://www.postgresql.org/docs/18/sql-declare.html > Are we concerned with servers that are not compatible with Postgres ? I think there's enough re-implementations of the postgres protocol by other databases that it would be a shame if we didn't even try to consider them, but I wouldn't consider it critical to get it right. Since they can always throw application errors for features they don't support, just like they do now for SQL that they don't support. They can always contribute changes to clients to make using unsupported features opt-in in the rare case where they are not.