git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 52d8e89)
A small tweak to some comments for PartitionKeyData
2018年11月15日 22:22:19 +0000 (23:22 +0100)
2018年11月15日 22:22:19 +0000 (23:22 +0100)
It was not really that obvious that there's meant to be exactly 1 item
in the partexprs List for each zero-valued partattrs element. Some
incorrect code using these fields was the cause of CVE-2018-1052, so
it's worthwhile to mention how they should be used in the comments.

Author: David Rowley <david.rowley@2ndquadrant.com>


diff --git a/src/include/utils/partcache.h b/src/include/utils/partcache.h
index 873c60fafd2e41840a4865ef2b3786738f7f8d60..2939032f0a99bedee7e14761e43f64e8d7f6578e 100644 (file)
--- a/src/include/utils/partcache.h
+++ b/src/include/utils/partcache.h
@@ -26,9 +26,9 @@ typedef struct PartitionKeyData
char strategy; /* partitioning strategy */
int16 partnatts; /* number of columns in the partition key */
AttrNumber *partattrs; /* attribute numbers of columns in the
- * partition key */
+ * partition key or 0 if it's an expr */
List *partexprs; /* list of expressions in the partitioning
- * key, or NIL */
+ * key, one for each zero-valued partattrs */
Oid *partopfamily; /* OIDs of operator families */
Oid *partopcintype; /* OIDs of opclass declared input data types */
This is the main PostgreSQL git repository.
RSS Atom

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