Re: libpq: PQgetCopyData() and allocation overhead

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeroen Vermeulen <jtvjtv(at)gmail(dot)com>
Cc: Jelte Fennema <postgres(at)jeltef(dot)nl>, 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 18:53:30
Message-ID: 2560654.1677869610@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeroen Vermeulen <jtvjtv(at)gmail(dot)com> writes:
> The printf() is just the simplest example that sprang to mind though.
> There may be other use-cases out there involving libraries that require
> zero-terminated strings, and I figured an ability to set a sentinel could
> help those.

Well, since it won't help for binary COPY, I'm skeptical that this is
something we should cater to. Anybody who's sufficiently worried about
performance to be trying to remove malloc/free cycles ought to be
interested in binary COPY as well.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2023-03-03 18:55:46 Re: zstd compression for pg_dump
Previous Message Tom Lane 2023-03-03 18:46:37 Re: libpq-fe.h should compile *entirely* standalone