Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e251d2a

Browse filesBrowse files
committed
Forbid 0 oid as partition_relid in build_range_condition.
1 parent 7aa7d1c commit e251d2a
Copy full SHA for e251d2a

File tree

1 file changed

+4
-0
lines changed
Filter options

1 file changed

+4
-0
lines changed

‎src/pl_range_funcs.c

Copy file name to clipboardExpand all lines: src/pl_range_funcs.c
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "utils.h"
1616
#include "xact_handling.h"
1717

18+
#include "access/transam.h"
1819
#include "access/xact.h"
1920
#include "catalog/heap.h"
2021
#include "catalog/namespace.h"
@@ -1072,6 +1073,9 @@ build_range_condition(PG_FUNCTION_ARGS)
10721073
}
10731074
else ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
10741075
errmsg("'partition_relid' should not be NULL")));
1076+
if (partition_relid < FirstNormalObjectId)
1077+
ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1078+
errmsg("'partition_relid' must be normal object oid")));
10751079

10761080
if (!PG_ARGISNULL(1))
10771081
{

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.