Commit 58a2148
Rahul Parande
Support for weak binding views to allow dropping of underlying objects.This commit introduces support for both strong and weak view binding in Babelfish, aligning more closely with SQL Server's default behavior while maintaining flexibility.
Key changes:
- Introduce GUC parameter 'babelfishpg_tsql.weak_view_binding' to control default binding behavior (default: false)
- Support explicit WITH SCHEMABINDING clause for strong binding
- Implement weak binding to allow dropping of referenced objects
- Handle ALTER VIEW operations in both binding modes
- Add logic to repair broken views when underlying objects are recreated
Limitations:
- Only addresses DROP operations on tables, views, functions, and procedures
- ALTER TABLE/ALTER FUNCTION operations still restricted when dependent views exist
- View repair follows PostgreSQL's CREATE OR REPLACE VIEW restrictions
Signed-off-by: Rahul Parande <rparande@amazon.com>1 parent e31358f commit 58a2148
File tree
41 files changed
+5082
-36
lines changed- contrib/babelfishpg_tsql
- runtime
- src
- test/JDBC
- expected
- input/views
- upgrade
- 15_10
- 15_12
- 15_13
- 15_14
- 15_1
- 15_2
- 15_3
- 15_4
- 15_5
- 15_6
- 15_7
- 15_8
- 16_10
- 16_1
- 16_2
- 16_3
- 16_4
- 16_6
- 16_8
- 16_9
- 17_4
- 17_5
- latest
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
41 files changed
+5082
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4481 | 4481 | | |
4482 | 4482 | | |
4483 | 4483 | | |
| 4484 | + | |
| 4485 | + | |
| 4486 | + | |
| 4487 | + | |
| 4488 | + | |
| 4489 | + | |
4484 | 4490 | | |
4485 | | - | |
| 4491 | + | |
4486 | 4492 | | |
4487 | 4493 | | |
4488 | 4494 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1199 | 1199 | | |
1200 | 1200 | | |
1201 | 1201 | | |
1202 | | - | |
| 1202 | + | |
1203 | 1203 | | |
1204 | 1204 | | |
1205 | 1205 | | |
1206 | 1206 | | |
1207 | 1207 | | |
1208 | 1208 | | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
1209 | 1214 | | |
1210 | | - | |
| 1215 | + | |
1211 | 1216 | | |
1212 | 1217 | | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
1213 | 1236 | | |
1214 | 1237 | | |
1215 | 1238 | | |
| |||
1239 | 1262 | | |
1240 | 1263 | | |
1241 | 1264 | | |
1242 | | - | |
| 1265 | + | |
1243 | 1266 | | |
1244 | 1267 | | |
1245 | 1268 | | |
| |||
1249 | 1272 | | |
1250 | 1273 | | |
1251 | 1274 | | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
1252 | 1278 | | |
1253 | 1279 | | |
1254 | 1280 | | |
1255 | 1281 | | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
1256 | 1286 | | |
1257 | 1287 | | |
1258 | 1288 | | |
| |||
1273 | 1303 | | |
1274 | 1304 | | |
1275 | 1305 | | |
1276 | | - | |
1277 | | - | |
| 1306 | + | |
1278 | 1307 | | |
1279 | 1308 | | |
1280 | 1309 | | |
1281 | 1310 | | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
1282 | 1327 | | |
1283 | 1328 | | |
1284 | 1329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
| 206 | + | |
205 | 207 | | |
206 | 208 | | |
207 | 209 | | |
208 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
209 | 214 | | |
210 | 215 | | |
211 | 216 | | |
212 | 217 | | |
213 | 218 | | |
214 | | - | |
215 | | - | |
216 | | - | |
| 219 | + | |
| 220 | + | |
217 | 221 | | |
218 | 222 | | |
219 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
630 | 631 | | |
631 | 632 | | |
632 | 633 | | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
633 | 644 | | |
634 | 645 | | |
635 | 646 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
0 commit comments