git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 79172a5) | patch
Clean up includes from RLS patch
2014年11月14日 21:53:51 +0000 (16:53 -0500)
2014年11月14日 22:05:17 +0000 (17:05 -0500)
commit 80eacaa3cdcd10383c333f6f4625af8cee1f7bee
Clean up includes from RLS patch

The initial patch for RLS mistakenly included headers associated with
the executor and planner bits in rewrite/rowsecurity.h. Per policy and
general good sense, executor headers should not be included in planner
headers or vice versa.

The include of execnodes.h was a mistaken holdover from previous
versions, while the include of relation.h was used for Relation's
definition, which should have been coming from utils/relcache.h. This
patch cleans these issues up, adds comments to the RowSecurityPolicy
struct and the RowSecurityConfigType enum, and changes Relation->rsdesc
to Relation->rd_rsdesc to follow Relation field naming convention.

Additionally, utils/rel.h was including rewrite/rowsecurity.h, which
wasn't a great idea since that was pulling in things not really needed
in utils/rel.h (which gets included in quite a few places). Instead,
use 'struct RowSecurityDesc' for the rd_rsdesc field and add comments
explaining why.

Lastly, add an include into access/nbtree/nbtsort.c for
utils/sortsupport.h, which was evidently missed due to the above mess.

Pointed out by Tom in 16970.1415838651@sss.pgh.pa.us; note that the
concerns regarding a similar situation in the custom-path commit still
need to be addressed.
src/backend/access/nbtree/nbtsort.c diff | blob | blame | history
src/backend/commands/policy.c diff | blob | blame | history
src/backend/rewrite/rowsecurity.c diff | blob | blame | history
src/backend/utils/cache/relcache.c diff | blob | blame | history
src/include/rewrite/rowsecurity.h diff | blob | blame | history
src/include/utils/rel.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /