postgresql/src/backend
Stephen Frost 3d5cb31c9a Improve RLS handling in copy.c
To avoid a race condition where the relation being COPY'd could be
changed into a view or otherwise modified, keep the original lock
on the relation.  Further, fully qualify the relation when building
the query up.

Also remove the poorly thought-out Assert() and check the entire
relationOids list as, post-RLS, there can certainly be multiple
relations involved and the planner does not guarantee their ordering.

Per discussion with Noah and Andres.

Back-patch to 9.5 where RLS was introduced.
2015-07-27 16:48:26 -04:00
..
access Don't assume that PageIsEmpty() returns true on an all-zeros page. 2015-07-27 18:54:09 +03:00
bootstrap pgindent run for 9.5 2015-05-23 21:35:49 -04:00
catalog Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
commands Improve RLS handling in copy.c 2015-07-27 16:48:26 -04:00
executor Remove false comment about speculative insertion. 2015-07-27 11:46:11 +03:00
foreign Code review for foreign/custom join pushdown patch. 2015-05-10 14:36:36 -04:00
lib Use appendStringInfoString/Char et al where appropriate. 2015-07-02 12:36:03 +03:00
libpq Call getsockopt() on the correct socket. 2015-07-06 16:36:48 +03:00
main Revoke support for strxfrm() that write past the specified array length. 2015-07-08 20:44:21 -04:00
nodes Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
optimizer Fix oversight in flattening of subqueries with empty FROM. 2015-07-26 17:44:27 -04:00
parser Fix flattening of nested grouping sets. 2015-07-26 16:50:29 +02:00
po Translation updates 2015-06-28 23:56:55 -04:00
port Make WaitLatchOrSocket's timeout detection more robust. 2015-07-18 11:47:13 -04:00
postmaster Further code review for pg_stat_ssl patch. 2015-07-27 16:29:14 -04:00
regex Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
replication Fix logical decoding bug leading to inefficient reopening of files. 2015-07-07 13:12:46 +02:00
rewrite Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
snowball Remove no-longer-required function declarations. 2015-05-24 12:20:23 -04:00
storage Fix a couple of bugs with wal_log_hints. 2015-06-26 12:38:24 +03:00
tcop Add ALTER OPERATOR command, for changing selectivity estimator functions. 2015-07-14 18:17:55 +03:00
tsearch pgindent run for 9.5 2015-05-23 21:35:49 -04:00
utils Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile AIX: Link the postgres executable with -Wl,-brtllib. 2015-07-15 21:00:26 -04:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
nls.mk Translation updates 2015-02-01 23:23:40 -05:00