Thread: Partitioning functions

Partitioning functions

From
"Mikael Carneholm"
Date:
Hi all.

I have created a script containing handy functions for creating&deleting range/list partitioned tables, see attached
file(part_functions.sql). 

This script defines the following functions:

partition_add(tblname text, part_suffix text, condition text)
partition_delete(tblname text, part_suffix text)
range_partition_year(tblname text, part_col text, the_year int)
range_partition_years_between(tblname text, part_col text, start_year int, end_year int)
range_partition_years_between_ba(tblname text, part_col text, start_year int, end_year int)

(See script for documentation and examples)

Hope you find it useful.

*******************************************************************
Mikael Carneholm
Systems Engineer
Service Delivery
WirelessCar
Address Kajskjul 107, Frihamnen, SE-417 07 Göteborg, Sweden
Phone + 46 31 65 19 57
Mobile + 46 703 22 29 57
Fax + 46 31 65 19 99
E-mail mikael.carneholm@wirelesscar.com
Website www.wirelesscar.com
Telematics made easy


Attachment