Commit ff11e7f
committed
Use slots in trigger infrastructure, except for the actual invocation.
In preparation for abstracting table storage, convert trigger.c to
track tuples in slots. Which also happens to make code calling
triggers simpler.
As the calling interface for triggers themselves is not changed in
this patch, HeapTuples still are extracted from the slot at that
time. But that's handled solely inside trigger.c, not visible to
callers. It's quite likely that we'll want to revise the external
trigger interface, but that's a separate large project.
As part of this work the slots used for old/new/return tuples are
moved from EState into ResultRelInfo, as different updated tables
might need different slots. The slots are now also now created
on-demand, which is good both from an efficiency POV, but also makes
the modifying code simpler.
Author: Andres Freund, Amit Khandekar and Ashutosh Bapat
Discussion: https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.de1 parent b8d7174 commit ff11e7f
File tree
14 files changed
+642
-571
lines changed- contrib/postgres_fdw
- src
- backend
- commands
- executor
- replication/logical
- utils/adt
- include
- commands
- executor
- nodes
14 files changed
+642
-571
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3507 | 3507 | | |
3508 | 3508 | | |
3509 | 3509 | | |
3510 | | - | |
3511 | | - | |
| 3510 | + | |
| 3511 | + | |
| 3512 | + | |
| 3513 | + | |
| 3514 | + | |
| 3515 | + | |
| 3516 | + | |
3512 | 3517 | | |
3513 | 3518 | | |
3514 | 3519 | | |
| |||
3886 | 3891 | | |
3887 | 3892 | | |
3888 | 3893 | | |
| 3894 | + | |
3889 | 3895 | | |
3890 | 3896 | | |
3891 | 3897 | | |
| |||
3895 | 3901 | | |
3896 | 3902 | | |
3897 | 3903 | | |
3898 | | - | |
| 3904 | + | |
3899 | 3905 | | |
3900 | | - | |
3901 | | - | |
3902 | | - | |
| 3906 | + | |
3903 | 3907 | | |
3904 | 3908 | | |
3905 | 3909 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2519 | 2519 | | |
2520 | 2520 | | |
2521 | 2521 | | |
2522 | | - | |
2523 | | - | |
2524 | | - | |
2525 | 2522 | | |
2526 | 2523 | | |
2527 | 2524 | | |
| |||
2870 | 2867 | | |
2871 | 2868 | | |
2872 | 2869 | | |
2873 | | - | |
| 2870 | + | |
2874 | 2871 | | |
2875 | 2872 | | |
2876 | 2873 | | |
| |||
2907 | 2904 | | |
2908 | 2905 | | |
2909 | 2906 | | |
2910 | | - | |
2911 | | - | |
2912 | | - | |
2913 | | - | |
2914 | | - | |
2915 | | - | |
| 2907 | + | |
| 2908 | + | |
2916 | 2909 | | |
2917 | 2910 | | |
2918 | 2911 | | |
| |||
2990 | 2983 | | |
2991 | 2984 | | |
2992 | 2985 | | |
2993 | | - | |
2994 | | - | |
2995 | | - | |
2996 | 2986 | | |
2997 | 2987 | | |
2998 | 2988 | | |
| |||
3002 | 2992 | | |
3003 | 2993 | | |
3004 | 2994 | | |
| 2995 | + | |
3005 | 2996 | | |
3006 | 2997 | | |
3007 | 2998 | | |
| |||
3018 | 3009 | | |
3019 | 3010 | | |
3020 | 3011 | | |
3021 | | - | |
| 3012 | + | |
3022 | 3013 | | |
3023 | 3014 | | |
3024 | 3015 | | |
| |||
3158 | 3149 | | |
3159 | 3150 | | |
3160 | 3151 | | |
3161 | | - | |
| 3152 | + | |
3162 | 3153 | | |
3163 | 3154 | | |
3164 | 3155 | | |
| |||
3175 | 3166 | | |
3176 | 3167 | | |
3177 | 3168 | | |
| 3169 | + | |
3178 | 3170 | | |
3179 | | - | |
| 3171 | + | |
3180 | 3172 | | |
3181 | 3173 | | |
3182 | 3174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8921 | 8921 | | |
8922 | 8922 | | |
8923 | 8923 | | |
8924 | | - | |
8925 | | - | |
8926 | 8924 | | |
8927 | 8925 | | |
8928 | 8926 | | |
| |||
0 commit comments