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 1r0KPq-0051vE-Eo for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Nov 2023 11:38:42 +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 1r0KPo-007t8G-CQ for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Nov 2023 11:38:40 +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 1r0KPo-007t87-2p for pgsql-hackers@lists.postgresql.org; Tue, 07 Nov 2023 11:38:40 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1r0KPl-004OJo-Pd for pgsql-hackers@lists.postgresql.org; Tue, 07 Nov 2023 11:38:38 +0000 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-53dfc28a2afso9364364a12.1 for ; Tue, 07 Nov 2023 03:38:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699357115; x=1699961915; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=C9aFTxEIeR8mIVeLER4an2Zm6tMEb+Mm6MuXjdhDGPk=; b=HSdpq18C6OshzRVtt32t7ZQSwwf2tiY/muwWR6MJb2HuN7ADKFE3oH6d3OD2lre9kS zinBrlSqhiTx6GGPIGQ5c0VpYBZ4eBWKnBRIKWhW1IQeH9K8s4lckBo118YboIzLAFUo T7SIxRH42oHQNWS1kBLHKkJWA4ItlOWHg7Jmu81NzUu6y2OAB+/6w2d+T0OAWrC4smig Z0jy6ltZKjsAgwaY+uBk7Rc10fJwOr5LLgYB3c3ksgM0qBQLR2Tx2J8BO7MRF0w4f61j egs0y6C3bNmTTDdJx7cXduQt1KjZcsFCmFjqKk8JDIHFHAGXvVOUPCUhh/t7IzKoYeRH K1qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699357115; x=1699961915; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=C9aFTxEIeR8mIVeLER4an2Zm6tMEb+Mm6MuXjdhDGPk=; b=YkPWwCq/ejKbByX0ZACFz5AU32qw7hEWLsm2F7b0rNnkQZBEmU5lMwYvXZBV+rb3Fq V5eNLbSOkQ3Qmw+j56beP4tXtDAzAJgGroMUirPRBtiKzdKNby69yLefUEDcapYVzktj +6DP1OOV+/yE5Xj7uM7x4JG67nv8a08Zao8HJc95oCddbOKEHLQeOUuoNnbS3RqBn89I 6VnbbfMi/Zo+9nU/P0u2nXj8qAuOwMfCKM6gwQw7avn6d/jhOt1wSD7YeKifqRcp2/j/ Nhjfgu2MZf9u4t5ib6dxVb+34LElARE0od0jdxcF8wwQSmqac3Z+7YMasAC9cN6C6EDZ z/6g== X-Gm-Message-State: AOJu0Yyi7eyIxJRXIZS58f0H/y5VR+F2C0v4dyOS0wl+Wc9iGFt+2Cv+ uRQfXo4YZP1FsZqa05Q8qDfhVR6NoVzn8vwZ2VZdKV+LHDE= X-Google-Smtp-Source: AGHT+IHHbnD6JiuM+KxJelPqmmvHNyGHv4Dxxcwl1n5QZZNVxfP9Qpxj6uV8KBxphMzElmLKSjRu7W1eCLdAxNxBlaE= X-Received: by 2002:a17:906:dacc:b0:9c7:4e5d:129a with SMTP id xi12-20020a170906dacc00b009c74e5d129amr16285668ejb.53.1699357115383; Tue, 07 Nov 2023 03:38:35 -0800 (PST) MIME-Version: 1.0 From: Dave Cramer Date: Tue, 7 Nov 2023 06:38:18 -0500 Message-ID: Subject: Protocol question regarding Portal vs Cursor To: PostgreSQL Hackers Content-Type: multipart/alternative; boundary="0000000000003583c506098e69f5" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000003583c506098e69f5 Content-Type: text/plain; charset="UTF-8" Greetings, If we use a Portal it is possible to open the portal and do a describe and then Fetch N records. Using a Cursor we open the cursor. Is there a corresponding describe and a way to fetch N records without getting the fields each time. Currently we have to send the SQL "fetch N" and we get the fields and the rows. This seems overly verbose. Dave Cramer --0000000000003583c506098e69f5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Greetings,

If we use a Portal it is pos= sible to open the portal and do a describe and then Fetch N records.
<= div>
Using a Cursor we open the cursor. Is there a correspond= ing describe and a way to fetch N records without=C2=A0getting the fields e= ach time. Currently we have to send the SQL=C2=A0 "fetch <direction= > N" and we get the fields and the rows. This seems overly verbose.=

Dave Cramer
--0000000000003583c506098e69f5--