Skip to content

Commit 7ac0069

Browse files
committed
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 <david.rowley@2ndquadrant.com>
1 parent 52d8e89 commit 7ac0069

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/include/utils/partcache.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ typedef struct PartitionKeyData
2626
char strategy; /* partitioning strategy */
2727
int16 partnatts; /* number of columns in the partition key */
2828
AttrNumber *partattrs; /* attribute numbers of columns in the
29-
* partition key */
29+
* partition key or 0 if it's an expr */
3030
List *partexprs; /* list of expressions in the partitioning
31-
* key, or NIL */
31+
* key, one for each zero-valued partattrs */
3232

3333
Oid *partopfamily; /* OIDs of operator families */
3434
Oid *partopcintype; /* OIDs of opclass declared input data types */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy