- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit2b5154b
committed
Extend ALTER OPERATOR to allow setting more optimization attributes.
Allow the COMMUTATOR, NEGATOR, MERGES, and HASHES attributes to be setby ALTER OPERATOR. However, we don't allow COMMUTATOR/NEGATOR to bechanged once set, nor allow the MERGES/HASHES flags to be unset onceset. Changes like that might invalidate plans already made, anddealing with the consequences seems like more trouble than it's worth.The main use-case we foresee for this is to allow addition of missedproperties in extension update scripts, such as extending an existingoperator to support hashing. So only transitions from not-set to setstates seem very useful.This patch also causes us to reject some incorrect cases that formerlyresulted in inconsistent catalog state, such as trying to set thecommutator of an operator to be some other operator that already has a(different) commutator.While at it, move the InvokeObjectPostCreateHook call for CREATEOPERATOR to not occur until after we've fixed up commutator or negatorlinks as needed. The previous ordering could only be justified bythinking of the OperatorUpd call as a kind of ALTER OPERATOR step;but we don't call InvokeObjectPostAlterHook therein. It seems betterto let the hook see the final state of the operator object.In the documentation, move the discussion of how to establishcommutator pairs from xoper.sgml to the CREATE OPERATOR ref page.Tommy Pavlicek, reviewed and editorialized a bit by meDiscussion:https://postgr.es/m/CAEhP-W-vGVzf4udhR5M8Bdv88UYnPrhoSkj3ieR3QNrsGQoqdg@mail.gmail.com1 parentdcd4454 commit2b5154b
File tree
13 files changed
+869
-205
lines changed- doc/src/sgml
- ref
- src
- backend
- catalog
- commands
- parser
- include
- catalog
- parser
- test/regress
- expected
- sql
13 files changed
+869
-205
lines changedLines changed: 81 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
33 |
| - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
34 | 38 |
| |
35 | 39 |
| |
36 | 40 |
| |
| |||
121 | 125 |
| |
122 | 126 |
| |
123 | 127 |
| |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
124 | 168 |
| |
125 | 169 |
| |
126 | 170 |
| |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
127 | 191 |
| |
128 | 192 |
| |
129 | 193 |
| |
130 | 194 |
| |
131 | 195 |
| |
132 | 196 |
| |
133 | 197 |
| |
134 |
| - | |
| 198 | + | |
| 199 | + | |
135 | 200 |
| |
136 | 201 |
| |
137 |
| - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
138 | 205 |
| |
139 |
| - | |
140 |
| - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
141 | 217 |
| |
142 | 218 |
| |
143 | 219 |
| |
|
Lines changed: 63 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
107 |
| - | |
| 107 | + | |
108 | 108 |
| |
109 | 109 |
| |
110 | 110 |
| |
111 | 111 |
| |
112 | 112 |
| |
113 | 113 |
| |
114 | 114 |
| |
115 |
| - | |
| 115 | + | |
116 | 116 |
| |
117 | 117 |
| |
118 | 118 |
| |
| |||
231 | 231 |
| |
232 | 232 |
| |
233 | 233 |
| |
234 |
| - | |
| 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 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
235 | 295 |
| |
236 | 296 |
| |
237 | 297 |
| |
|
Lines changed: 0 additions & 44 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
146 | 146 |
| |
147 | 147 |
| |
148 | 148 |
| |
149 |
| - | |
150 |
| - | |
151 |
| - | |
152 |
| - | |
153 |
| - | |
154 |
| - | |
155 |
| - | |
156 |
| - | |
157 |
| - | |
158 |
| - | |
159 |
| - | |
160 |
| - | |
161 |
| - | |
162 |
| - | |
163 |
| - | |
164 |
| - | |
165 |
| - | |
166 |
| - | |
167 |
| - | |
168 |
| - | |
169 |
| - | |
170 |
| - | |
171 |
| - | |
172 |
| - | |
173 |
| - | |
174 |
| - | |
175 |
| - | |
176 |
| - | |
177 |
| - | |
178 |
| - | |
179 |
| - | |
180 |
| - | |
181 |
| - | |
182 |
| - | |
183 |
| - | |
184 |
| - | |
185 |
| - | |
186 |
| - | |
187 | 149 |
| |
188 | 150 |
| |
189 | 151 |
| |
| |||
217 | 179 |
| |
218 | 180 |
| |
219 | 181 |
| |
220 |
| - | |
221 |
| - | |
222 |
| - | |
223 |
| - | |
224 |
| - | |
225 |
| - | |
226 | 182 |
| |
227 | 183 |
| |
228 | 184 |
| |
|
0 commit comments
Comments
(0)