aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistbuild.c
diff options
context:
space:
mode:
authorStephen Frost <sfrost@snowman.net>2016-10-03 16:23:12 -0400
committerStephen Frost <sfrost@snowman.net>2016-10-03 16:23:12 -0400
commit647a86e374d2eb01d8cdda2fc759a770b38cc232 (patch)
treeabea3cb2f0237f61ef2a8a48d3dba1afb2bc7060 /src/backend/access/gist/gistbuild.c
parent0f259bd178f64b8e351a62d5479e3565e84b956e (diff)
downloadpostgresql-647a86e374d2eb01d8cdda2fc759a770b38cc232.tar.gz
postgresql-647a86e374d2eb01d8cdda2fc759a770b38cc232.zip
Fix RLS with COPY (col1, col2) FROM tab
Attempting to COPY a subset of columns from a table with RLS enabled would fail due to an invalid query being constructed (using a single ColumnRef with the list of fields to exact in 'fields', but that's for the different levels of an indirection for a single column, not for specifying multiple columns). Correct by building a ColumnRef and then RestTarget for each column being requested and then adding those to the targetList for the select query. Include regression tests to hopefully catch if this is broken again in the future. Patch-By: Adam Brightwell Reviewed-By: Michael Paquier
Diffstat (limited to 'src/backend/access/gist/gistbuild.c')
0 files changed, 0 insertions, 0 deletions