We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65786ab commit 5d43c57Copy full SHA for 5d43c57
src/pl_funcs.c
@@ -32,6 +32,7 @@
32
#include "nodes/nodeFuncs.h"
33
#include "utils/builtins.h"
34
#include "utils/inval.h"
35
+#include "utils/ruleutils.h"
36
#include "utils/snapmgr.h"
37
#include "utils/lsyscache.h"
38
#include "utils/syscache.h"
@@ -781,6 +782,11 @@ add_to_pathman_config(PG_FUNCTION_ARGS)
781
782
/* Parse and check expression */
783
expr_datum = cook_partitioning_expression(relid, expression, &expr_type);
784
785
+ /* Canonicalize user's expression (trim whitespaces etc) */
786
+ expression = deparse_expression(stringToNode(TextDatumGetCString(expr_datum)),
787
+ deparse_context_for(get_rel_name(relid), relid),
788
+ false, false);
789
+
790
/* Check hash function for HASH partitioning */
791
if (parttype == PT_HASH)
792
{
0 commit comments