fix broken call to SetUserIdAndSecContext() in ri_triggers.c
authorTomas Vondra <[email protected]>
Wed, 9 Nov 2016 13:39:37 +0000 (14:39 +0100)
committerTomas Vondra <[email protected]>
Wed, 9 Nov 2016 13:39:37 +0000 (14:39 +0100)
Probably due to incorrect merge or something like that.

src/backend/utils/adt/ri_triggers.c

index 698d903e6e1ddf7ba89b50bcf0447631c56a2f9d..eeec525fdaa03c24e8876d58216fde091d186f9c 100644 (file)
@@ -3022,6 +3022,7 @@ ri_PlanCheck(const char *querystr, int nargs, Oid *argtypes,
        GetUserIdAndSecContext(&save_userid, &save_sec_context);
        SetUserIdAndSecContext(RelationGetForm(query_rel)->relowner,
                                                   save_sec_context | SECURITY_LOCAL_USERID_CHANGE |
+                                                  SECURITY_NOFORCE_RLS);
 
        /* Create the plan */
        qplan = SPI_prepare(querystr, nargs, argtypes);