Re: libpq: PQgetCopyData() and allocation overhead

From: Jelte Fennema <postgres(at)jeltef(dot)nl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jeroen Vermeulen <jtvjtv(at)gmail(dot)com>, daniel(at)yesql(dot)se, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq: PQgetCopyData() and allocation overhead
Date: 2023-03-03 17:49:22
Message-ID: CAGECzQR98cz9BnydSdPn91pMTJRJ41OhPM9+eYst3dpp-0zwdw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 3 Mar 2023 at 17:33, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> If you mean exposing PQExpBuffer to users of libpq-fe.h, I'd be very
> seriously against that. I realize that libpq exposes it at an ABI
> level, but that doesn't mean we want non-Postgres code to use it.

The code comment in the pqexpbuffer.h header suggests that client
applications are fine too use the API to:

> * This module is essentially the same as the backend's StringInfo data type,
> * but it is intended for use in frontend libpq and client applications.

I know both pg_auto_failover and pgcopydb use it quite a lot.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2023-03-03 17:53:10 Re: Fix comments in gistxlogDelete, xl_heap_freeze_page and xl_btree_delete
Previous Message Tom Lane 2023-03-03 17:46:42 Re: pgsql: Harden new test case against force_parallel_mode = regress.