forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc98a923
committed
Fix failure to ensure that a snapshot is available to datatype input functions
when they are invoked by the parser. We had been setting up a snapshot atplan time but really it needs to be done earlier, before parse analysis.Per report from Dmitry Koterov.Also fix two related problems discovered while poking at this one:exec_bind_message called datatype input functions without establishing asnapshot, and SET CONSTRAINTS IMMEDIATE could call trigger functions withoutestablishing a snapshot.Backpatch to 8.2. The underlying problem goes much further back, but it ismasked in 8.1 and before because we didn't attempt to invoke domain checkconstraints within datatype input. It would only be exposed if a C-languagedatatype input function used the snapshot; which evidently none do, or we'dhave heard complaints sooner. Since this code has changed a lot over time,a back-patch is hardly risk-free, and so I'm disinclined to patch furtherthan absolutely necessary.1 parent0f864a6 commitc98a923
File tree
5 files changed
+145
-14
lines changed- src
- backend
- commands
- parser
- tcop
- utils/cache
- include/parser
5 files changed
+145
-14
lines changedLines changed: 20 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
3716 | 3716 |
| |
3717 | 3717 |
| |
3718 | 3718 |
| |
| 3719 | + | |
3719 | 3720 |
| |
3720 | 3721 |
| |
3721 | 3722 |
| |
3722 | 3723 |
| |
3723 | 3724 |
| |
| 3725 | + | |
| 3726 | + | |
| 3727 | + | |
| 3728 | + | |
| 3729 | + | |
| 3730 | + | |
| 3731 | + | |
| 3732 | + | |
| 3733 | + | |
| 3734 | + | |
| 3735 | + | |
| 3736 | + | |
| 3737 | + | |
| 3738 | + | |
| 3739 | + | |
3724 | 3740 |
| |
3725 | 3741 |
| |
3726 | 3742 |
| |
| |||
3730 | 3746 |
| |
3731 | 3747 |
| |
3732 | 3748 |
| |
| 3749 | + | |
| 3750 | + | |
| 3751 | + | |
3733 | 3752 |
| |
3734 | 3753 |
| |
3735 | 3754 |
| |
|
Lines changed: 50 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
| 20 | + | |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| |||
217 | 217 |
| |
218 | 218 |
| |
219 | 219 |
| |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
220 | 269 |
| |
221 | 270 |
| |
222 | 271 |
| |
|
Lines changed: 52 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 |
| |
| |||
685 | 685 |
| |
686 | 686 |
| |
687 | 687 |
| |
| 688 | + | |
| 689 | + | |
| 690 | + | |
688 | 691 |
| |
689 | 692 |
| |
690 | 693 |
| |
| |||
872 | 875 |
| |
873 | 876 |
| |
874 | 877 |
| |
| 878 | + | |
875 | 879 |
| |
876 | 880 |
| |
877 | 881 |
| |
| |||
913 | 917 |
| |
914 | 918 |
| |
915 | 919 |
| |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
916 | 929 |
| |
917 | 930 |
| |
918 | 931 |
| |
| |||
924 | 937 |
| |
925 | 938 |
| |
926 | 939 |
| |
927 |
| - | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
928 | 945 |
| |
929 | 946 |
| |
930 | 947 |
| |
| |||
939 | 956 |
| |
940 | 957 |
| |
941 | 958 |
| |
942 |
| - | |
| 959 | + | |
943 | 960 |
| |
944 | 961 |
| |
945 | 962 |
| |
| |||
1178 | 1195 |
| |
1179 | 1196 |
| |
1180 | 1197 |
| |
| 1198 | + | |
1181 | 1199 |
| |
1182 | 1200 |
| |
1183 | 1201 |
| |
| |||
1202 | 1220 |
| |
1203 | 1221 |
| |
1204 | 1222 |
| |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
1205 | 1232 |
| |
1206 | 1233 |
| |
1207 | 1234 |
| |
| |||
1249 | 1276 |
| |
1250 | 1277 |
| |
1251 | 1278 |
| |
1252 |
| - | |
| 1279 | + | |
1253 | 1280 |
| |
1254 | 1281 |
| |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
1255 | 1286 |
| |
1256 | 1287 |
| |
1257 | 1288 |
| |
| |||
1375 | 1406 |
| |
1376 | 1407 |
| |
1377 | 1408 |
| |
| 1409 | + | |
1378 | 1410 |
| |
1379 | 1411 |
| |
1380 | 1412 |
| |
| |||
1494 | 1526 |
| |
1495 | 1527 |
| |
1496 | 1528 |
| |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
1497 | 1540 |
| |
1498 | 1541 |
| |
1499 | 1542 |
| |
| |||
1682 | 1725 |
| |
1683 | 1726 |
| |
1684 | 1727 |
| |
1685 |
| - | |
| 1728 | + | |
1686 | 1729 |
| |
1687 | 1730 |
| |
1688 | 1731 |
| |
| |||
1691 | 1734 |
| |
1692 | 1735 |
| |
1693 | 1736 |
| |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
1694 | 1741 |
| |
1695 | 1742 |
| |
1696 | 1743 |
| |
|
Lines changed: 20 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
38 |
| - | |
| 38 | + | |
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
| |||
463 | 463 |
| |
464 | 464 |
| |
465 | 465 |
| |
| 466 | + | |
466 | 467 |
| |
467 | 468 |
| |
468 | 469 |
| |
| |||
472 | 473 |
| |
473 | 474 |
| |
474 | 475 |
| |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
475 | 489 |
| |
476 | 490 |
| |
477 | 491 |
| |
| |||
488 | 502 |
| |
489 | 503 |
| |
490 | 504 |
| |
491 |
| - | |
492 |
| - | |
493 |
| - | |
494 |
| - | |
495 | 505 |
| |
496 | 506 |
| |
497 |
| - | |
| 507 | + | |
498 | 508 |
| |
499 | 509 |
| |
500 | 510 |
| |
| |||
525 | 535 |
| |
526 | 536 |
| |
527 | 537 |
| |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
528 | 542 |
| |
529 | 543 |
| |
530 | 544 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
| 28 | + | |
| 29 | + | |
28 | 30 |
| |
29 | 31 |
| |
30 | 32 |
| |
|
0 commit comments
Comments
(0)