From e034be794c996e8e66712a83dc2e56bf1aceb19a Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Mon, 23 Apr 2018 09:03:34 +0200 Subject: [PATCH] Also fix partexprs usage --- hypopg_table.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hypopg_table.c b/hypopg_table.c index 836601b..3083cd3 100644 --- a/hypopg_table.c +++ b/hypopg_table.c @@ -743,12 +743,13 @@ hypo_generate_partkey(CreateStmt *stmt, Oid parentid, hypoTable *entry) */ stmt->partspec = transformPartitionSpec(rel, stmt->partspec, &strategy); - key->strategy = strategy; ComputePartitionAttrs(rel, stmt->partspec->partParams, partattrs, &partexprs, partopclass, partcollation, strategy); + key->strategy = strategy; + key->partexprs = partexprs; /*--- Adapted from RelationBuildPartitionKey ---*/ { @@ -852,8 +853,6 @@ hypo_generate_partkey(CreateStmt *stmt, Oid parentid, hypoTable *entry) heap_close(rel, AccessShareLock); - key->strategy = strategy; - key->partexprs = partexprs; /*-------- * Copied in previous loop key->partattrs = partattrs;