Search Postgresql Archives

Partitioning functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
Website www.wirelesscar.com
Telematics made easy
 

Attachment: part_functions.sql
Description: part_functions.sql

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux