forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb635ac0
committed
Fix performance problem with new COPY DEFAULT code
9f8377f added code to allow COPY FROM insert a column's default valuewhen the input matches the DEFAULT string specified in the COPY command.Here we fix some inefficient code which needlessly palloc0'd an array tostore if we should use the default value or input value for the givencolumn. This array was being palloc0'd and pfree'd once per row. It'smuch more efficient to allocate this once and just reset the values onceper row.Reported-by: Masahiko SawadaAuthor: Masahiko SawadaDiscussion:https://postgr.es/m/CAD21AoDvDmUQeJtZrau1ovnT_smN940%3DKp6mszNGK3bq9yRN6g%40mail.gmail.comBackpatch-through: 16, where9f8377f was introduced.1 parentf6a8454 commitb635ac0
2 files changed
+2
-3
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1609 | 1609 |
| |
1610 | 1610 |
| |
1611 | 1611 |
| |
| 1612 | + | |
1612 | 1613 |
| |
1613 | 1614 |
| |
1614 | 1615 |
| |
|
Lines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
871 | 871 |
| |
872 | 872 |
| |
873 | 873 |
| |
874 |
| - | |
| 874 | + | |
875 | 875 |
| |
876 | 876 |
| |
877 | 877 |
| |
| |||
1040 | 1040 |
| |
1041 | 1041 |
| |
1042 | 1042 |
| |
1043 |
| - | |
1044 |
| - | |
1045 | 1043 |
| |
1046 | 1044 |
| |
1047 | 1045 |
| |
|
0 commit comments
Comments
(0)