- Notifications
You must be signed in to change notification settings - Fork28
Commit2c50c9f
committed
Fix psql's "\g target" meta-command to work with COPY TO STDOUT.
Previously, \g would successfully execute the COPY command, butthe target specification if any was ignored, so that the data wasalways dumped to the regular query output target. This seems likea clear bug, so let's not just fix it but back-patch it.While at it, adjust the documentation for \copy to recommend"COPY ... TO STDOUT \g foo" as a plausible alternative.Back-patch to 9.5. The problem exists much further back, but thecode associated with \g was refactored enough in 9.5 that we'dneed a significantly different patch for 9.4, and it doesn'tseem worth the trouble.Daniel Vérité, reviewed by Fabien CoelhoDiscussion:https://postgr.es/m/15dadc39-e050-4d46-956b-dcc4ed098753@manitou-mail.org1 parentc0aed69 commit2c50c9f
3 files changed
+73
-13
lines changedLines changed: 18 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1027 | 1027 |
| |
1028 | 1028 |
| |
1029 | 1029 |
| |
1030 |
| - | |
1031 |
| - | |
1032 |
| - | |
1033 |
| - | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
1034 | 1048 |
| |
1035 | 1049 |
| |
1036 | 1050 |
| |
|
Lines changed: 50 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1092 | 1092 |
| |
1093 | 1093 |
| |
1094 | 1094 |
| |
1095 |
| - | |
1096 |
| - | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
1097 | 1099 |
| |
1098 |
| - | |
| 1100 | + | |
1099 | 1101 |
| |
1100 | 1102 |
| |
1101 | 1103 |
| |
1102 | 1104 |
| |
1103 | 1105 |
| |
1104 |
| - | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
1105 | 1130 |
| |
| 1131 | + | |
| 1132 | + | |
1106 | 1133 |
| |
1107 | 1134 |
| |
1108 |
| - | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
1109 | 1138 |
| |
1110 | 1139 |
| |
1111 | 1140 |
| |
| |||
1117 | 1146 |
| |
1118 | 1147 |
| |
1119 | 1148 |
| |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
1120 | 1163 |
| |
1121 | 1164 |
| |
1122 | 1165 |
| |
1123 |
| - | |
1124 |
| - | |
| 1166 | + | |
| 1167 | + | |
1125 | 1168 |
| |
1126 | 1169 |
| |
1127 | 1170 |
| |
|
Lines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
425 | 425 |
| |
426 | 426 |
| |
427 | 427 |
| |
| 428 | + | |
428 | 429 |
| |
| 430 | + | |
| 431 | + | |
429 | 432 |
| |
430 | 433 |
| |
431 | 434 |
| |
| |||
447 | 450 |
| |
448 | 451 |
| |
449 | 452 |
| |
450 |
| - | |
| 453 | + | |
451 | 454 |
| |
452 | 455 |
| |
453 | 456 |
| |
| |||
458 | 461 |
| |
459 | 462 |
| |
460 | 463 |
| |
461 |
| - | |
| 464 | + | |
462 | 465 |
| |
463 | 466 |
| |
464 | 467 |
| |
|
0 commit comments
Comments
(0)