Re: libpq: PQgetCopyData() and allocation overhead - Mailing list pgsql-hackers

From Tom Lane
Subject Re: libpq: PQgetCopyData() and allocation overhead
Date
Msg-id 2560654.1677869610@sss.pgh.pa.us
Whole thread Raw
In response to Re: libpq: PQgetCopyData() and allocation overhead  (Jeroen Vermeulen <jtvjtv@gmail.com>)
Responses Re: libpq: PQgetCopyData() and allocation overhead  (Jeroen Vermeulen <jtvjtv@gmail.com>)
List pgsql-hackers
Jeroen Vermeulen <jtvjtv@gmail.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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: libpq-fe.h should compile *entirely* standalone
Next
From: Justin Pryzby
Date:
Subject: Re: zstd compression for pg_dump