- Notifications
You must be signed in to change notification settings - Fork28
Commitfd15dba
committed
Fix encode(...bytea..., 'escape') so that it converts all high-bit-set byte
values into \nnn octal escape sequences. When the database encoding ismultibyte this is *necessary* to avoid generating invalidly encoded text.Even in a single-byte encoding, the old behavior seems very hazardous ---consider for example what happens if the text is transferred to anotherdatabase with a different encoding. Decoding would then yield some otherbytea value than what was encoded, which is surely undesirable. Per gripefrom Hernan Gonzalez.Backpatch to 8.3, but not further. This is a bit of a judgment call, but Imake it on these grounds: pre-8.3 we don't really have much encoding safetyanyway because of the convert() function family, and we would also have muchhigher risk of breaking existing apps that may not be expecting this behavior.8.3 is still new enough that we can probably get away with making this changein the function's behavior.1 parentbc93919 commitfd15dba
1 file changed
+21
-16
lines changedLines changed: 21 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
29 |
| - | |
| 29 | + | |
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 |
| - | |
| 45 | + | |
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
81 |
| - | |
| 81 | + | |
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
| |||
348 | 348 |
| |
349 | 349 |
| |
350 | 350 |
| |
351 |
| - | |
352 |
| - | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
353 | 356 |
| |
354 |
| - | |
| 357 | + | |
355 | 358 |
| |
356 | 359 |
| |
357 | 360 |
| |
| |||
366 | 369 |
| |
367 | 370 |
| |
368 | 371 |
| |
369 |
| - | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
370 | 375 |
| |
371 | 376 |
| |
372 |
| - | |
373 |
| - | |
374 |
| - | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
375 | 380 |
| |
376 | 381 |
| |
377 | 382 |
| |
378 |
| - | |
| 383 | + | |
379 | 384 |
| |
380 | 385 |
| |
381 | 386 |
| |
| |||
384 | 389 |
| |
385 | 390 |
| |
386 | 391 |
| |
387 |
| - | |
| 392 | + | |
388 | 393 |
| |
389 | 394 |
| |
390 | 395 |
| |
| |||
450 | 455 |
| |
451 | 456 |
| |
452 | 457 |
| |
453 |
| - | |
| 458 | + | |
454 | 459 |
| |
455 | 460 |
| |
456 | 461 |
| |
| |||
510 | 515 |
| |
511 | 516 |
| |
512 | 517 |
| |
513 |
| - | |
| 518 | + | |
514 | 519 |
| |
515 | 520 |
| |
516 | 521 |
| |
| |||
543 | 548 |
| |
544 | 549 |
| |
545 | 550 |
| |
546 |
| - | |
| 551 | + | |
547 | 552 |
| |
548 | 553 |
| |
549 | 554 |
| |
|
0 commit comments
Comments
(0)