summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut2018-11-15 22:22:19 +0000
committerPeter Eisentraut2018-11-15 22:22:19 +0000
commit7ac0069fb880b9b64223f104058c82773321851c (patch)
treea58998275164d1cd5da511ead371a13a7af89794 /src
parent52d8e899d0f0849f9dfc61a9f93ba857a8431216 (diff)
A small tweak to some comments for PartitionKeyData
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/include/utils/partcache.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/utils/partcache.h b/src/include/utils/partcache.h
index 873c60fafd2..2939032f0a9 100644
--- 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 */