Re: Protocol question regarding Portal vs Cursor

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dave Cramer <davecramer(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Protocol question regarding Portal vs Cursor
Date: 2023-11-07 15:26:42
Message-ID: 123128.1699370802@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dave Cramer <davecramer(at)gmail(dot)com> writes:
> 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 <direction> N" and we get the fields and the
> rows. This seems overly verbose.

Portals and cursors are pretty much the same thing, so why not use
the API that suits you better?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2023-11-07 15:44:42 Re: meson documentation build open issues
Previous Message Tom Lane 2023-11-07 15:24:32 Re: Relids instead of Bitmapset * in plannode.h