Replace pq_getbytes(&ch, 1) calls with pq_getbyte(), which is easier

Tom Lane <tgl@sss.pgh.pa.us>

Commit: f4bd04bb67c5da67b4fc35aa4da4ac47cff4cd66
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2001-12-04T19:40:17Z
Releases: 7.2.1
Replace pq_getbytes(&ch, 1) calls with pq_getbyte(), which is easier
to use and significantly faster.  This tweak saves 25% (!) of the runtime
of COPY IN in a test with 8000-character lines.  I wouldn't normally
commit a performance improvement this late in the cycle, but 25% got
my attention...

Files

PathChange+/−
src/backend/commands/copy.c modified +5 −11
src/backend/libpq/pqcomm.c modified +3 −2
src/backend/tcop/postgres.c modified +10 −11
src/include/libpq/libpq.h modified +2 −1