6 Replies Latest reply on Apr 17, 2019 8:33 PM by Mike Kutz

    Expand SQL Statement includes generated VPD policy in where clause

    Jeffrey Kemp

      The "Expand SQL Statement" feature can be quite useful to refactor code, e.g. when "select * from..." is used in PL/SQL.

       

      However, it suggests an expansion that includes the where clause generated by a VPD policy, which is not appropriate. Unless the developer takes action to remove this part of the query they will potentially introduce unnecessary (and in some cases, incorrect) code (especially if the VPD policy is dynamic). Example shown:

      Capture.PNG

      Ideally SQL Developer should generate a SQL expansion that does not include any VPD policy.