postgresql/src/backend/commands
Heikki Linnakangas f82de5c46b Do COPY FROM encoding conversion/verification in larger chunks.
This gives a small performance gain, by reducing the number of calls
to the conversion/verification function, and letting it work with
larger inputs. Also, reorganizing the input pipeline makes it easier
to parallelize the input parsing: after the input has been converted
to the database encoding, the next stage of finding the newlines can
be done in parallel, because there cannot be any newline chars
"embedded" in multi-byte characters in the encodings that we support
as server encodings.

This changes behavior in one corner case: if client and server
encodings are the same single-byte encoding (e.g. latin1), previously
the input would not be checked for zero bytes ('\0'). Any fields
containing zero bytes would be truncated at the zero. But if encoding
conversion was needed, the conversion routine would throw an error on
the zero. After this commit, the input is always checked for zeros.

Reviewed-by: John Naylor
Discussion: https://www.postgresql.org/message-id/e7861509-3960-538a-9025-b75a61188e01%40iki.fi
2021-04-01 12:23:40 +03:00
..
aggregatecmds.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
alter.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
amcmds.c Fix some typos, grammar and style in docs and comments 2021-02-24 16:13:17 +09:00
analyze.c Use pre-fetching for ANALYZE 2021-03-16 14:46:48 -04:00
async.c Remove server and libpq support for old FE/BE protocol version 2. 2021-03-04 10:45:55 +02:00
cluster.c Refactor option handling of CLUSTER, REINDEX and VACUUM 2021-01-18 14:03:10 +09:00
collationcmds.c Validate the OID argument of pg_import_system_collations(). 2021-03-08 18:21:51 -05:00
comment.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
constraint.c Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
conversioncmds.c Add 'noError' argument to encoding conversion functions. 2021-04-01 11:45:22 +03:00
copy.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
copyfrom.c Do COPY FROM encoding conversion/verification in larger chunks. 2021-04-01 12:23:40 +03:00
copyfromparse.c Do COPY FROM encoding conversion/verification in larger chunks. 2021-04-01 12:23:40 +03:00
copyto.c Add support for more progress reporting in COPY 2021-03-09 14:21:03 +09:00
createas.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
dbcommands.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
define.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
discard.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
dropcmds.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
event_trigger.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
explain.c Revert b6002a796 2021-04-01 13:33:23 +13:00
extension.c Add mbverifystr() functions specific to each encoding. 2021-01-28 14:40:07 +02:00
foreigncmds.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
functioncmds.c Re-implement pl/pgsql's expression and assignment parsing. 2021-01-04 11:52:00 -05:00
indexcmds.c ALTER TABLE ... DETACH PARTITION ... CONCURRENTLY 2021-03-25 18:00:28 -03:00
lockcmds.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
Makefile Split copy.c into four files. 2020-11-23 10:50:50 +02:00
matview.c Enable parallelism in REFRESH MATERIALIZED VIEW. 2021-03-17 15:04:17 +13:00
opclasscmds.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
operatorcmds.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
policy.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
portalcmds.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
prepare.c Improve performance of repeated CALLs within plpgsql procedures. 2021-01-25 22:28:29 -05:00
proclang.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
publicationcmds.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
schemacmds.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
seclabel.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
sequence.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
statscmds.c Extended statistics on expressions 2021-03-27 00:01:11 +01:00
subscriptioncmds.c Improve style of some replication-related error messages. 2021-03-31 15:25:53 -04:00
tablecmds.c Extended statistics on expressions 2021-03-27 00:01:11 +01:00
tablespace.c Prevent drop of tablespaces used by partitioned relations 2021-01-14 15:32:14 -03:00
trigger.c Rework planning and execution of UPDATE and DELETE. 2021-03-31 11:52:37 -04:00
tsearchcmds.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
typecmds.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
user.c Add "pg_database_owner" default role. 2021-03-26 10:42:17 -07:00
vacuum.c Use a WaitLatch for vacuum/autovacuum sleeping 2021-03-30 12:52:56 -04:00
variable.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
view.c Update copyright for 2021 2021-01-02 13:06:25 -05:00