forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite8476f4
committed
Fix COPY FROM for null marker strings that correspond to invalid encoding.
The COPY documentation says "COPY FROM matches the input against the nullstring before removing backslashes". It is therefore reasonable to presumethat null markers like E'\\0' will work ... and they did, until someone putthe tests in the wrong order during microoptimization-driven rewrites.Since then, we've been failing if the null marker is something that wouldde-escape to an invalidly-encoded string. Since null markers generallyneed to be something that can't appear in the data, this represents anontrivial loss of functionality; surprising nobody noticed it earlier.Per report from Jeff Davis. Backpatch to 8.4 where this got broken.1 parentc7cea26 commite8476f4
3 files changed
+60
-16
lines changedLines changed: 29 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3243 | 3243 |
| |
3244 | 3244 |
| |
3245 | 3245 |
| |
3246 |
| - | |
| 3246 | + | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
| 3254 | + | |
| 3255 | + | |
| 3256 | + | |
3247 | 3257 |
| |
3248 | 3258 |
| |
3249 | 3259 |
| |
| |||
3356 | 3366 |
| |
3357 | 3367 |
| |
3358 | 3368 |
| |
3359 |
| - | |
3360 |
| - | |
3361 |
| - | |
3362 |
| - | |
3363 |
| - | |
3364 |
| - | |
3365 |
| - | |
3366 |
| - | |
3367 |
| - | |
3368 |
| - | |
3369 |
| - | |
3370 |
| - | |
3371 |
| - | |
3372 |
| - | |
3373 |
| - | |
3374 | 3369 |
| |
3375 | 3370 |
| |
3376 | 3371 |
| |
3377 | 3372 |
| |
3378 | 3373 |
| |
| 3374 | + | |
| 3375 | + | |
| 3376 | + | |
| 3377 | + | |
| 3378 | + | |
| 3379 | + | |
| 3380 | + | |
| 3381 | + | |
| 3382 | + | |
| 3383 | + | |
| 3384 | + | |
| 3385 | + | |
| 3386 | + | |
| 3387 | + | |
| 3388 | + | |
| 3389 | + | |
| 3390 | + | |
| 3391 | + | |
3379 | 3392 |
| |
3380 | 3393 |
| |
3381 | 3394 |
| |
|
Lines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
239 | 239 |
| |
240 | 240 |
| |
241 | 241 |
| |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
242 | 258 |
| |
243 | 259 |
| |
244 | 260 |
|
Lines changed: 15 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
164 | 164 |
| |
165 | 165 |
| |
166 | 166 |
| |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
167 | 182 |
| |
168 | 183 |
| |
169 | 184 |
|
0 commit comments
Comments
(0)