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 1vSjOo-004UTg-1S for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Dec 2025 22:08:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vSjOn-001so2-07 for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Dec 2025 22:08:05 +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 1vSjOm-001snu-1h for pgsql-hackers@lists.postgresql.org; Mon, 08 Dec 2025 22:08:05 +0000 Received: from mail-oo1-xc2f.google.com ([2607:f8b0:4864:20::c2f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vSjOk-003pLe-10 for pgsql-hackers@lists.postgresql.org; Mon, 08 Dec 2025 22:08:03 +0000 Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-65968986a0cso2864351eaf.3 for ; Mon, 08 Dec 2025 14:08:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765231682; x=1765836482; 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=UNoonZIJ6FY6Tk9UcRbQRekTYIlKrSarrP0Bb2n8s2M=; b=ZKy7QB81h54rzqExanVIdqUj++OTQMqbiosrY9JTBO08b0mWIhrtwOwL401wFlVdDf CcgMEw0AvZyV06DRUogiMPao+6n6rahs6XxH98f75g5caznjD/zsYCAZCjbOgiCG8QC6 RGLVVeS/7YiW7aNpVBwuAsrVPXq0xniI8bw3b/E7BvP9aXe3hOyBMAcZSbDFpl84ZCSA NmFTBKPrBvXyDPNZ22P6gDGovW4E5fIe3T4R6UlLgsMM0osWcGyUF86wfHn2VyDYQ6pA tGXA1lbKePePTDwsMS1l0Xvid7u68p/Q5h0qXGkvaaeZqAUsrmPsXHZnwiXe6XPPfHiF XSKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765231682; x=1765836482; 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=UNoonZIJ6FY6Tk9UcRbQRekTYIlKrSarrP0Bb2n8s2M=; b=JZhehhJWgb282w4JhnwWmlWUimR+kSiI6crdIFIBHI9IEQfm6s4snJ39ho0w767EoD 9rKWgyjlX48gJF9yO29Kp0MuF6kURWdFvDDMVzbwU79JGAJliNPOqn4Sbd3SmKJXZZHu O+m7IArm6j+/iW60LLrcoQBP5uS6CPL9MkRiR+cIkvbCent2KdwPpBV7okZZ6Bs5TgAG DZql/aNG4ER+M+OeJvcSR3KJ8zRlO4CCkmX1H7ZWsD2VFY8iBDnBnO9ZEy3JVkejR7Hc J0okKBXMFa+r9G3uSikXpnWk4buNMO71nxNdPYGyiuxhsun0scedlxksOd1FMAhoCw6N TZnQ== X-Gm-Message-State: AOJu0YzIbaqqLYER2xQ7dTnjmqKf3vyhskRa0dD6l6ZUNVlAbEsJjbYN 37DhuwOjMaS2ZNIv2GK6waNjRNq0XtvnudTGrmE/UgdHpley+u6QuMYMRw/uVEFr4LoBQNNMINq ej1P25AbKvdyAz6l+lPc5RM+3l5Jq+Xs= X-Gm-Gg: ASbGncsYk68ZECkLGLO2lsxlgy5DE2f3m6t6tU6Nr+rxuq8qfJNtyaU8c5byPkZOYK8 CpZnb3FvdJywitgej//9Z4Pg7B34W9xL34yNAVzvjCG+iD4x9sSNuSE97NRLz38Bq3iF/EAvP9J Kd3Qk7br3GIkRg4+6aIdZevpLcMGgzraFoGgXVAgP3yYa/uwLNZH3s/b553Ptk2J0ba1+0sPbJd xy9HbEbQLkDsDwbAJcZJqj1Xy1APoVt64l9igx9oUDhT5AiWApUVdmrYOCqYqvcrlu3eJPb X-Google-Smtp-Source: AGHT+IGCSh6XNKkKGvfODIICPF1b1s60RL/yMA7joMAenWO/JlVW3EuvXnYoDKe4gnOgUyKiEVv9P7AFfkzKcgaIDRk= X-Received: by 2002:a05:6820:1694:b0:659:9a49:904e with SMTP id 006d021491bc7-6599a8e9fc9mr3978412eaf.25.1765231681780; Mon, 08 Dec 2025 14:08:01 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Dave Cramer Date: Mon, 8 Dec 2025 17:07:50 -0500 X-Gm-Features: AQt7F2osW0ORezu-qviyMHSj63V2XTXb_ZjtL2Ykj2dIuItvbwp9EofdBSvhAIw Message-ID: Subject: Re: Proposal to allow setting cursor options on Portals To: Jelte Fennema-Nio Cc: PostgreSQL Hackers , Jacob Champion Content-Type: multipart/alternative; boundary="00000000000056c37806457807ee" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000056c37806457807ee Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Dec 8, 2025 at 4:43=E2=80=AFPM Jelte Fennema-Nio wrote: > On Sun, 7 Dec 2025 at 15:38, Dave Cramer wrote: > > My main driver here is to allow the creation of Holdable portals at the > protocol level for drivers. > > Overall seems like a sensible feature to want. A somewhat random > collection of thoughts: > > 1. We still have fairly limited experience with protocol options, so > afaik not everyone agrees what we should use a version bump for vs a > protocol extension. > 2. I think I like the idea of optional fields that a client can add to > the existing messages. That way "implementing" the new protocol > version is a no-op for clients. > 3. I think we should mark optional fields more clearly in the docs > somehow. e.g. Make the docs say Optional Int32 and > explain what Optional means in the "Message Data Types" section. > 4. I think the server should be strict that it only receives this > optional field for the expected protocol version. > 5. Do we really need to add the CURSOR_BINARY flag? Seems confusing > with our other way of indicating binary support, i.e. what does it > mean to say text as the format code but then specify CURSOR_BINARY. > 6. What is the benefit of PQsendQueryPreparedWithCursorOptions? I > understand the use case for PQsendBindWithCursorOptions, but not for > PQsendQueryPreparedWithCursorOptions. > 7. The server should check that no unknown flags are passed > 8. Docs need to be added for the new libpq function(s) > > I have one question about your intended usage: I expect you intend to > make using this opt-in for the users of pgjdbc? (i.e. by using some > flag/different method to use this HOLD behaviour) Thx for the comments. Yes JDBC has a holdable resultset as a standard part of the API Dave > > --00000000000056c37806457807ee Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable



On Mon, Dec 8, 2025 at 4= :43=E2=80=AFPM Jelte Fennema-Nio <= postgres@jeltef.nl> wrote:
On Sun, 7 Dec 2= 025 at 15:38, Dave Cramer <davecramer@gmail.com> wrote:
> My main driver here is to allow the creation of Holdable portals at th= e protocol level for drivers.

Overall seems like a sensible feature to want. A somewhat random
collection of thoughts:

1. We still have fairly limited experience with protocol options, so
afaik not everyone agrees what we should use a version bump for vs a
protocol extension.
2. I think I like the idea of optional fields that a client can add to
the existing messages. That way "implementing" the new protocol version is a no-op for clients.
3. I think we should mark optional fields more clearly in the docs
somehow. e.g. Make the docs say <term>Optional Int32</term> and=
explain what Optional means in the "Message Data Types" section.<= br> 4. I think the server should be strict that it only receives this
optional field for the expected protocol version.
5. Do we really need to add the CURSOR_BINARY flag? Seems confusing
with our other way of indicating binary support, i.e. what does it
mean to say text as the format code but then specify CURSOR_BINARY.
6. What is the benefit of PQsendQueryPreparedWithCursorOptions? I
understand the use case for PQsendBindWithCursorOptions, but not for
PQsendQueryPreparedWithCursorOptions.
7. The server should check that no unknown flags are passed
8. Docs need to be added for the new libpq function(s)

I have one question about your intended usage: I expect you intend to
make using this opt-in for the users of pgjdbc? (i.e. by using some
flag/different method to use this HOLD behaviour)

Thx for the comments. Yes JDBC has a holda= ble resultset as a standard part of the API

Dave

--00000000000056c37806457807ee--