【发布时间】:2021-12-07 09:37:17
【问题描述】:
是否可以扩展由 db 用户执行的每个选择查询?
例如用户将执行
select * from mytable
并在后台执行以下操作:
select * from mytable union all select * from different_schema.mytable
可以通过使用 VPD 函数的动态 where 子句来限制查询。
return '1=1'
我可以使用 VPD 扩展查询以同时从不同架构中选择数据吗?
return '1=1 union all select * from different_schema.' || tab;
上述示例出现以下错误:
ORA-28113: 策略谓词有错误
一种解决方法是创建一堆包含联合的动态生成的视图,但如果可能的话,我想使用 VPD 或类似的方法。
【问题讨论】: