diff options
Diffstat (limited to 'src/backend/executor/execMain.c')
-rw-r--r-- | src/backend/executor/execMain.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index b45850bd2b4..a390829bb8e 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -26,7 +26,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.248 2005/05/06 17:24:53 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.249 2005/05/22 22:30:19 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -353,16 +353,10 @@ ExecCheckRTEPerms(RangeTblEntry *rte) AclId userid; /* - * If it's a subquery, recursively examine its rangetable. - */ - if (rte->rtekind == RTE_SUBQUERY) - { - ExecCheckRTPerms(rte->subquery->rtable); - return; - } - - /* - * Otherwise, only plain-relation RTEs need to be checked here. + * Only plain-relation RTEs need to be checked here. Subquery RTEs + * are checked by ExecInitSubqueryScan if the subquery is still a + * separate subquery --- if it's been pulled up into our query level + * then the RTEs are in our rangetable and will be checked here. * Function RTEs are checked by init_fcache when the function is * prepared for execution. Join and special RTEs need no checks. */ |