postgresql/src/backend
Stephen Frost 7d8db3e8f3 Include policies based on ACLs needed
When considering which policies should be included, rather than look at
individual bits of the query (eg: if a RETURNING clause exists, or if a
WHERE clause exists which is referencing the table, or if it's a
FOR SHARE/UPDATE query), consider any case where we've determined
the user needs SELECT rights on the relation while doing an UPDATE or
DELETE to be a case where we apply SELECT policies, and any case where
we've deteremind that the user needs UPDATE rights on the relation while
doing a SELECT to be a case where we apply UPDATE policies.

This simplifies the logic and addresses concerns that a user could use
UPDATE or DELETE with a WHERE clauses to determine if rows exist, or
they could use SELECT .. FOR UPDATE to lock rows which they are not
actually allowed to modify through UPDATE policies.

Use list_append_unique() to avoid adding the same quals multiple times,
as, on balance, the cost of checking when adding the quals will almost
always be cheaper than keeping them and doing busywork for each tuple
during execution.

Back-patch to 9.5 where RLS was added.
2015-09-30 07:39:24 -04:00
..
access Code review for transaction commit timestamps 2015-09-29 14:40:56 -03:00
bootstrap pgindent run for 9.5 2015-05-23 21:35:49 -04:00
catalog Determine whether it's safe to attempt a parallel plan for a query. 2015-09-16 15:38:47 -04:00
commands Small improvements in comments in async.c. 2015-09-29 22:07:16 -04:00
executor Parallel executor support. 2015-09-28 21:55:57 -04:00
foreign Code review for foreign/custom join pushdown patch. 2015-05-10 14:36:36 -04:00
lib Avoid use of float arithmetic in bipartite_match.c. 2015-08-23 13:02:18 -04:00
libpq Support RADIUS passwords up to 128 characters 2015-09-06 14:31:53 +02:00
main Revoke support for strxfrm() that write past the specified array length. 2015-07-08 20:44:21 -04:00
nodes Parallel executor support. 2015-09-28 21:55:57 -04:00
optimizer Comment update for join pushdown. 2015-09-29 07:42:30 -04:00
parser Determine whether it's safe to attempt a parallel plan for a query. 2015-09-16 15:38:47 -04:00
po Translation updates 2015-06-28 23:56:55 -04:00
port Rely on inline functions even if that causes warnings in older compilers. 2015-08-05 18:19:52 +02:00
postmaster Remove files signaling a standby promotion request at postmaster startup 2015-09-09 22:51:44 +09:00
regex Fix low-probability memory leak in regex execution. 2015-09-18 13:55:17 -04:00
replication Fix "sesssion" typo 2015-09-28 19:13:42 -03:00
rewrite Include policies based on ACLs needed 2015-09-30 07:39:24 -04:00
snowball Remove no-longer-required function declarations. 2015-05-24 12:20:23 -04:00
storage Use LOCKBIT_ON() instead of a bit shift in a few places. 2015-09-28 10:57:15 -04:00
tcop Glue layer to connect the executor to the shm_mq mechanism. 2015-09-18 21:56:58 -04:00
tsearch pgindent run for 9.5 2015-05-23 21:35:49 -04:00
utils Parallel executor support. 2015-09-28 21:55:57 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Fix build problems in commit aa65de042f. 2015-09-11 14:56:17 -04:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
nls.mk Remove trailing slashes from directories in find command 2015-09-18 22:06:54 -04:00