Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

postgres automatic partioning a table

create or replace rule autoCall_createPartitionIfNotExists as on insert
    to myTable
    do instead (
        select createPartitionIfNotExists(NEW.forDate);
        insert into myTable_master (forDate, key2, value) values (NEW.forDate, NEW.key2, NEW.value)
    );
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #postgres #automatic #partioning #table
ADD COMMENT
Topic
Name
3+6 =