aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/json.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2013-05-01 18:26:50 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2013-05-01 18:26:50 -0400
commit50c137487c96e629e0e5372bb3d1b5f1a2f71a88 (patch)
tree31972d0bdacb621bc30df6271c983844ddb41725 /src/backend/utils/adt/json.c
parent200ba1667b3a8d7a9d559d2f05f83d209c9d8267 (diff)
downloadpostgresql-50c137487c96e629e0e5372bb3d1b5f1a2f71a88.tar.gz
postgresql-50c137487c96e629e0e5372bb3d1b5f1a2f71a88.zip
Fix permission tests for views/tables proven empty by constraint exclusion.
A view defined as "select <something> where false" had the curious property that the system wouldn't check whether users had the privileges necessary to select from it. More generally, permissions checks could be skipped for tables referenced in sub-selects or views that were proven empty by constraint exclusion (although some quick testing suggests this seldom happens in cases of practical interest). This happened because the planner failed to include rangetable entries for such tables in the finished plan. This was noticed in connection with erroneous handling of materialized views, but actually the issue is quite unrelated to matviews. Therefore, revert commit 200ba1667b3a8d7a9d559d2f05f83d209c9d8267 in favor of a more direct test for the real problem. Back-patch to 9.2 where the bug was introduced (by commit 7741dd6590073719688891898e85f0cb73453159).
Diffstat (limited to 'src/backend/utils/adt/json.c')
0 files changed, 0 insertions, 0 deletions