Skip to content

Commit a6ca7c2

Browse files
committed
fix check_overlap(): return false if there's no partitions
1 parent f19a764 commit a6ca7c2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/pl_range_funcs.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,17 @@ check_overlap(PG_FUNCTION_ARGS)
104104
RangeEntry *ranges;
105105
const PartRelationInfo *prel;
106106

107+
108+
/* Try fetching the PartRelationInfo structure */
107109
prel = get_pathman_relation_info(parent_oid);
110+
111+
/* If there's no prel, return FALSE (overlap is not possible) */
112+
if (!prel) PG_RETURN_BOOL(false);
113+
114+
/* Emit an error if it is not partitioned by RANGE */
108115
shout_if_prel_is_invalid(parent_oid, prel, PT_RANGE);
109116

117+
/* Get base type of partitioned column */
110118
part_type = getBaseType(prel->atttype);
111119

112120
/* Fetch comparison functions */

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