| From: | Marko Tiikkaja <marko(at)joh(dot)to> |
|---|---|
| To: | Shay Rojansky <roji(at)roji(dot)org>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Proper query implementation for Postgresql driver |
| Date: | 2014-09-28 10:40:41 |
| Message-ID: | 5427E5A9.5060109@joh.to |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 9/28/14, 11:53 AM, Shay Rojansky wrote:
> I would, in theory, love to switch the entire thing to binary and thereby
> avoid all textual parsing once and for all. If I understand correctly, this
> means all queries must be implemented as extended queries, with numerous
> extra client-server roundtrips - which are a bit hard to stomach. Section
> 49.1.2 of the manual also states that the unnamed prepared statement and
> portal are optimized for the case of executing a query only once, hinting
> that this is the proper way to do things - but this optimization still
> cannot not eliminate the extra roundtrips mentioned above (PREPARE, BIND,
> EXECUTE).
You don't have to do multiple round-trips for that; you can just send
all the messages in one go. See how e.g. libpq does it in PQexecParams().
.marko
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andreas Karlsson | 2014-09-28 11:25:09 | Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} |
| Previous Message | Shay Rojansky | 2014-09-28 09:53:40 | Proper query implementation for Postgresql driver |