From be61dc423f6c9614158097a3d0b68d0d4cd47e61 Mon Sep 17 00:00:00 2001 From: yuzupy Date: Tue, 6 Nov 2018 10:20:23 +0900 Subject: [PATCH] Change hypoTable struct to have its number of tuples --- hypopg_table.c | 2 ++ include/hypopg_table.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/hypopg_table.c b/hypopg_table.c index 3c149f2..9188a75 100644 --- a/hypopg_table.c +++ b/hypopg_table.c @@ -1478,6 +1478,8 @@ hypo_newTable(Oid parentid) entry = (hypoTable *) palloc0(sizeof(hypoTable)); entry->tablename = palloc0(NAMEDATALEN); + entry->set_tuples = false; /* wil be generated later if needed */ + entry->tuples = 0; /* wil be generated later if needed */ entry->boundspec = NULL; /* wil be generated later if needed */ entry->partkey = NULL; /* wil be generated later if needed */ diff --git a/include/hypopg_table.h b/include/hypopg_table.h index 87701b7..5ce1fa3 100644 --- a/include/hypopg_table.h +++ b/include/hypopg_table.h @@ -40,6 +40,8 @@ typedef struct hypoTable char *tablename; /* hypothetical partition name, or original table name for root parititon */ Oid namespace; /* Oid of the hypothetical table's schema */ + bool set_tuples; /* tuples are already set or not */ + int tuples; /* number of tuples of this table */ /* added for internal use */ PartitionBoundSpec *boundspec; /* Needed to generate the PartitionDesc and