forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit82a4798
committed
Arrange for SET LOCAL's effects to persist until the end of the current top
transaction, unless rolled back or overridden by a SET clause for the samevariable attached to a surrounding function call. Per discussion, theseseem the best semantics. Note that this is an INCOMPATIBLE CHANGE: in 8.0through 8.2, SET LOCAL's effects disappeared at subtransaction commit(leading to behavior that made little sense at the SQL level).I took advantage of the opportunity to rewrite and simplify the GUC variablesave/restore logic a little bit. The old idea of a "tentative" value is gone;it was a hangover from before we had a stack. Also, we no longer need a stackentry for every nesting level, but only for those in which a variable's valueactually changed.1 parentb366562 commit82a4798
File tree
16 files changed
+798
-494
lines changed- doc/src/sgml/ref
- src
- backend/utils
- adt
- fmgr
- init
- misc
- include/utils
- test/regress
- expected
- sql
16 files changed
+798
-494
lines changedLines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
475 | 475 |
| |
476 | 476 |
| |
477 | 477 |
| |
478 |
| - | |
| 478 | + | |
479 | 479 |
| |
480 |
| - | |
481 |
| - | |
482 |
| - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
483 | 483 |
| |
484 | 484 |
| |
485 | 485 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
94 | 94 |
| |
95 | 95 |
| |
96 | 96 |
| |
97 |
| - | |
| 97 | + | |
| 98 | + | |
98 | 99 |
| |
99 | 100 |
| |
100 | 101 |
| |
|
Lines changed: 22 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 |
| - | |
48 |
| - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
49 | 52 |
| |
50 | 53 |
| |
51 | 54 |
| |
52 |
| - | |
53 |
| - | |
| 55 | + | |
| 56 | + | |
54 | 57 |
| |
55 | 58 |
| |
56 | 59 |
| |
| |||
62 | 65 |
| |
63 | 66 |
| |
64 | 67 |
| |
65 |
| - | |
66 |
| - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
67 | 71 |
| |
68 | 72 |
| |
69 | 73 |
| |
| |||
83 | 87 |
| |
84 | 88 |
| |
85 | 89 |
| |
86 |
| - | |
| 90 | + | |
87 | 91 |
| |
88 |
| - | |
| 92 | + | |
89 | 93 |
| |
90 | 94 |
| |
91 | 95 |
| |
| |||
97 | 101 |
| |
98 | 102 |
| |
99 | 103 |
| |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
100 | 113 |
|
Lines changed: 46 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
43 |
| - | |
44 |
| - | |
| 43 | + | |
| 44 | + | |
45 | 45 |
| |
46 |
| - | |
47 |
| - | |
48 |
| - | |
49 |
| - | |
| 46 | + | |
50 | 47 |
| |
51 | 48 |
| |
52 | 49 |
| |
| |||
59 | 56 |
| |
60 | 57 |
| |
61 | 58 |
| |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
62 | 89 |
| |
63 | 90 |
| |
64 | 91 |
| |
| |||
106 | 133 |
| |
107 | 134 |
| |
108 | 135 |
| |
109 |
| - | |
110 |
| - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
111 | 141 |
| |
112 | 142 |
| |
113 | 143 |
| |
| |||
200 | 230 |
| |
201 | 231 |
| |
202 | 232 |
| |
203 |
| - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
204 | 236 |
| |
205 | 237 |
| |
206 | 238 |
| |
| |||
221 | 253 |
| |
222 | 254 |
| |
223 | 255 |
| |
224 |
| - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
225 | 260 |
| |
226 | 261 |
| |
227 | 262 |
| |
|
Lines changed: 7 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
36 | 36 |
| |
37 | 37 |
| |
38 | 38 |
| |
39 |
| - | |
| 39 | + | |
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
| |||
130 | 130 |
| |
131 | 131 |
| |
132 | 132 |
| |
133 |
| - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
134 | 138 |
| |
135 | 139 |
| |
136 | 140 |
| |
|
Lines changed: 4 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 |
| - | |
| 18 | + | |
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| |||
2749 | 2749 |
| |
2750 | 2750 |
| |
2751 | 2751 |
| |
2752 |
| - | |
| 2752 | + | |
2753 | 2753 |
| |
2754 | 2754 |
| |
2755 | 2755 |
| |
| |||
2832 | 2832 |
| |
2833 | 2833 |
| |
2834 | 2834 |
| |
2835 |
| - | |
2836 |
| - | |
| 2835 | + | |
2837 | 2836 |
| |
2838 | 2837 |
| |
2839 | 2838 |
| |
2840 | 2839 |
| |
2841 |
| - | |
| 2840 | + | |
2842 | 2841 |
| |
2843 | 2842 |
| |
2844 | 2843 |
| |
|
Lines changed: 3 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
925 | 925 |
| |
926 | 926 |
| |
927 | 927 |
| |
928 |
| - | |
929 | 928 |
| |
930 | 929 |
| |
931 | 930 |
| |
932 |
| - | |
| 931 | + | |
933 | 932 |
| |
934 | 933 |
| |
935 | 934 |
| |
936 | 935 |
| |
937 | 936 |
| |
938 | 937 |
| |
939 | 938 |
| |
940 |
| - | |
941 |
| - | |
| 939 | + | |
942 | 940 |
| |
943 | 941 |
| |
944 | 942 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
453 | 453 |
| |
454 | 454 |
| |
455 | 455 |
| |
456 |
| - | |
| 456 | + | |
457 | 457 |
| |
458 | 458 |
| |
459 | 459 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
255 | 255 |
| |
256 | 256 |
| |
257 | 257 |
| |
258 |
| - | |
| 258 | + | |
259 | 259 |
| |
260 | 260 |
| |
261 | 261 |
| |
|
0 commit comments
Comments
(0)