aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonpath.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2023-07-27 14:48:44 +1200
committerDavid Rowley <drowley@postgresql.org>2023-07-27 14:48:44 +1200
commitc1308ce2d9224f0ec08128ab35e161837f9a5105 (patch)
tree9edc26aaf4ffa979f2f35ae2da3391bfbf733aaf /src/backend/utils/adt/jsonpath.c
parentb4f14d2e433bf9f2499f07bcaca07b9ff13d641b (diff)
downloadpostgresql-c1308ce2d9224f0ec08128ab35e161837f9a5105.tar.gz
postgresql-c1308ce2d9224f0ec08128ab35e161837f9a5105.zip
Fix performance problem with new COPY DEFAULT code
9f8377f7a added code to allow COPY FROM insert a column's default value when the input matches the DEFAULT string specified in the COPY command. Here we fix some inefficient code which needlessly palloc0'd an array to store if we should use the default value or input value for the given column. This array was being palloc0'd and pfree'd once per row. It's much more efficient to allocate this once and just reset the values once per row. Reported-by: Masahiko Sawada Author: Masahiko Sawada Discussion: https://postgr.es/m/CAD21AoDvDmUQeJtZrau1ovnT_smN940%3DKp6mszNGK3bq9yRN6g%40mail.gmail.com Backpatch-through: 16, where 9f8377f7a was introduced.
Diffstat (limited to 'src/backend/utils/adt/jsonpath.c')
0 files changed, 0 insertions, 0 deletions