From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Cyril VELTER" <cyril(dot)velter(at)metadys(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Prepared queries and portals |
Date: | 2004-03-04 00:01:25 |
Message-ID: | 19393.1078358485@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Cyril VELTER" <cyril(dot)velter(at)metadys(dot)com> writes:
> so I've modified libpq to handle the case by adding to functions :
> PQexecPreparedPortal(conn,stmtName,portalName,nParams,paramValues,paramlengt
> h,paramFormats,resultFormat,maxrows);
> and
> PQfetchPortal(conn,portalName,maxrows)
> PQexecPreparedPortal is a PQexecPrepared clone but you can specify the
> portal in which the result should be put (which might be the unnamed one)
> and the maximum number of rows to retreive after the execution.
> PQfetchPortal fetch the next rows.
> This works nicely.
This looks fairly messy to me. Seems like the exposed API ought to be
three functions: set up a portal, fetch (up to) N rows from a portal,
close down a portal. Your proposal confuses the first two and fails to
provide the last.
More generally it might be a good idea to provide lower-level access to
other parts of the extended-query protocol, such as Describe and Sync.
I did not do anything about that in 7.4 for lack of time, but it's still
something that ought to be thought about.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Alex J. Avriette | 2004-03-04 00:19:50 | Re: Slony-I makes progress |
Previous Message | Neil Conway | 2004-03-03 23:50:04 | Re: [PERFORM] WAL Optimisation - configuration and usage |