forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit66c029c
committed
Fix volatility markings of some contrib I/O functions.
In general, datatype I/O functions are supposed to be immutable or atworst stable. Some contrib I/O functions were, through oversight, notmarked with any volatility property at all, which made them VOLATILE.Since (most of) these functions actually behave immutably, the erroneousmarking isn't terribly harmful; but it can be user-visible in certaincircumstances, as per a recent bug report from Joe Van Dyk in which acast to text was disallowed in an expression index definition.To fix, just adjust the declarations in the extension SQL scripts. If wewere being very fussy about this, we'd bump the extension version numbers,but that seems like more trouble (for both developers and users) than theproblem is worth.A fly in the ointment is that chkpass_in actually is volatile, becauseof its use of random() to generate a fresh salt when presented with anot-yet-encrypted password. This is bad because of the general assumptionthat I/O functions aren't volatile: the consequence is that records orarrays containing chkpass elements may have input behavior a bit differentfrom a bare chkpass column. But there seems no way to fix this withoutbreaking existing usage patterns for chkpass, and the consequences of theinconsistency don't seem bad enough to justify that. So for the moment,just document it in a comment.Since we're not bumping version numbers, there seems no harm inback-patching these fixes; at least future installations will get thefunctions marked correctly.1 parente809fa2 commit66c029c
File tree
3 files changed
+15
-12
lines changed- contrib
- chkpass
- ltree
- pg_trgm
3 files changed
+15
-12
lines changedLines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 |
| |
15 | 18 |
| |
16 | 19 |
| |
17 | 20 |
| |
18 |
| - | |
| 21 | + | |
19 | 22 |
| |
20 | 23 |
| |
21 | 24 |
| |
|
Lines changed: 8 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
| 14 | + | |
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| |||
303 | 303 |
| |
304 | 304 |
| |
305 | 305 |
| |
306 |
| - | |
| 306 | + | |
307 | 307 |
| |
308 | 308 |
| |
309 | 309 |
| |
310 | 310 |
| |
311 |
| - | |
| 311 | + | |
312 | 312 |
| |
313 | 313 |
| |
314 | 314 |
| |
| |||
414 | 414 |
| |
415 | 415 |
| |
416 | 416 |
| |
417 |
| - | |
| 417 | + | |
418 | 418 |
| |
419 | 419 |
| |
420 | 420 |
| |
421 | 421 |
| |
422 |
| - | |
| 422 | + | |
423 | 423 |
| |
424 | 424 |
| |
425 | 425 |
| |
| |||
481 | 481 |
| |
482 | 482 |
| |
483 | 483 |
| |
484 |
| - | |
| 484 | + | |
485 | 485 |
| |
486 | 486 |
| |
487 | 487 |
| |
488 | 488 |
| |
489 |
| - | |
| 489 | + | |
490 | 490 |
| |
491 | 491 |
| |
492 | 492 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
56 |
| - | |
| 56 | + | |
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
61 |
| - | |
| 61 | + | |
62 | 62 |
| |
63 | 63 |
| |
64 | 64 |
| |
|
0 commit comments
Comments
(0)