- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitb23ac5a
committed
Avoid doing catalog lookups in postgres_fdw's conversion_error_callback.
As in50371df, this is a bad idea since the callback can't reallyknow what error is being thrown and thus whether or not it is safeto attempt catalog accesses. Rather than pushing said accesses intothe mainline code where they'd usually be a waste of cycles, we canlook at the query's rangetable instead.This change does mean that we'll be printing query aliases (if anywere used) rather than the table or column's true name. But thatdoesn't seem like a bad thing: it's certainly a more useful definitionin self-join cases, for instance. In any case, it seems unlikely thatany applications would be depending on this detail, so it seems safeto change.Patch by me. Original complaint by Andres Freund; Bharath Rupireddynoted the connection to conversion_error_callback.Discussion:https://postgr.es/m/20210106020229.ne5xnuu6wlondjpe@alap3.anarazel.de1 parent9034b68 commitb23ac5a
File tree
3 files changed
+51
-52
lines changed- contrib/postgres_fdw
- expected
- sql
3 files changed
+51
-52
lines changedLines changed: 8 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4175 | 4175 |
| |
4176 | 4176 |
| |
4177 | 4177 |
| |
4178 |
| - | |
| 4178 | + | |
4179 | 4179 |
| |
4180 |
| - | |
4181 |
| - | |
| 4180 | + | |
| 4181 | + | |
| 4182 | + | |
4182 | 4183 |
| |
4183 |
| - | |
4184 |
| - | |
| 4184 | + | |
| 4185 | + | |
| 4186 | + | |
4185 | 4187 |
| |
4186 |
| - | |
| 4188 | + | |
4187 | 4189 |
| |
4188 | 4190 |
| |
4189 | 4191 |
| |
|
Lines changed: 38 additions & 43 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
244 | 244 |
| |
245 | 245 |
| |
246 | 246 |
| |
247 |
| - | |
248 | 247 |
| |
249 |
| - | |
250 |
| - | |
251 |
| - | |
252 |
| - | |
253 |
| - | |
254 |
| - | |
255 |
| - | |
256 |
| - | |
| 248 | + | |
257 | 249 |
| |
258 | 250 |
| |
259 | 251 |
| |
| |||
5026 | 5018 |
| |
5027 | 5019 |
| |
5028 | 5020 |
| |
5029 |
| - | |
5030 | 5021 |
| |
5031 | 5022 |
| |
5032 | 5023 |
| |
| |||
5146 | 5137 |
| |
5147 | 5138 |
| |
5148 | 5139 |
| |
| 5140 | + | |
| 5141 | + | |
| 5142 | + | |
| 5143 | + | |
5149 | 5144 |
| |
5150 | 5145 |
| |
5151 | 5146 |
| |
5152 | 5147 |
| |
| 5148 | + | |
| 5149 | + | |
| 5150 | + | |
| 5151 | + | |
| 5152 | + | |
5153 | 5153 |
| |
5154 | 5154 |
| |
5155 | 5155 |
| |
5156 |
| - | |
5157 | 5156 |
| |
5158 |
| - | |
| 5157 | + | |
5159 | 5158 |
| |
5160 | 5159 |
| |
5161 |
| - | |
5162 |
| - | |
5163 |
| - | |
5164 |
| - | |
5165 |
| - | |
5166 |
| - | |
5167 |
| - | |
5168 |
| - | |
5169 |
| - | |
5170 |
| - | |
| 5160 | + | |
| 5161 | + | |
5171 | 5162 |
| |
5172 | 5163 |
| |
5173 | 5164 |
| |
5174 | 5165 |
| |
5175 |
| - | |
5176 |
| - | |
5177 |
| - | |
5178 | 5166 |
| |
5179 | 5167 |
| |
5180 | 5168 |
| |
5181 | 5169 |
| |
5182 | 5170 |
| |
5183 | 5171 |
| |
5184 | 5172 |
| |
5185 |
| - | |
| 5173 | + | |
5186 | 5174 |
| |
5187 | 5175 |
| |
5188 | 5176 |
| |
5189 | 5177 |
| |
5190 |
| - | |
5191 | 5178 |
| |
5192 | 5179 |
| |
5193 |
| - | |
5194 |
| - | |
5195 |
| - | |
5196 |
| - | |
5197 |
| - | |
5198 |
| - | |
5199 |
| - | |
5200 |
| - | |
| 5180 | + | |
| 5181 | + | |
5201 | 5182 |
| |
5202 |
| - | |
5203 |
| - | |
5204 |
| - | |
5205 | 5183 |
| |
5206 | 5184 |
| |
5207 |
| - | |
| 5185 | + | |
5208 | 5186 |
| |
5209 |
| - | |
5210 |
| - | |
5211 |
| - | |
5212 |
| - | |
| 5187 | + | |
| 5188 | + | |
| 5189 | + | |
| 5190 | + | |
| 5191 | + | |
| 5192 | + | |
| 5193 | + | |
| 5194 | + | |
| 5195 | + | |
| 5196 | + | |
| 5197 | + | |
| 5198 | + | |
| 5199 | + | |
5213 | 5200 |
| |
| 5201 | + | |
| 5202 | + | |
| 5203 | + | |
| 5204 | + | |
| 5205 | + | |
| 5206 | + | |
| 5207 | + | |
| 5208 | + | |
5214 | 5209 |
| |
5215 | 5210 |
| |
5216 | 5211 |
| |
|
Lines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1055 | 1055 |
| |
1056 | 1056 |
| |
1057 | 1057 |
| |
1058 |
| - | |
1059 |
| - | |
1060 |
| - | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
1061 | 1063 |
| |
1062 | 1064 |
| |
1063 | 1065 |
| |
|
0 commit comments
Comments
(0)