xocolatl / periods

PERIODs and SYSTEM VERSIONING for PostgreSQL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow history table to be partitioned

eryx67 opened this issue · comments

Is it possible to allow history table to be partitioned?
Function add_system_versioning doesn't allow me to do so, probably here:

CASE object_type

But if I create history table as normal and then substitute its name with name of partitioned
table all works fine:

UPDATE periods.system_versioning SET history_table_name = TO_REGCLASS('partitioned_table_hist')
WHERE history_table_name='normal_table_hist'::regclass;

The only problem is management. I have to change all partitioned table names every time I need to add
a new history table.