From: | "Mikael Carneholm" <Mikael(dot)Carneholm(at)WirelessCar(dot)com> |
---|---|
To: | "'Pgsql-General (E-mail)" <pgsql-general(at)postgresql(dot)org> |
Subject: | Partitioning functions |
Date: | 2005-11-10 20:40:52 |
Message-ID: | 7F10D26ECFA1FB458B89C5B4B0D72C2B0A01D5@sesrv12.wirelesscar.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(dot)carneholm(at)wirelesscar(dot)com
Website www.wirelesscar.com
Telematics made easy
Attachment | Content-Type | Size |
---|---|---|
part_functions.sql | application/octet-stream | 9.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Matthew T. O'Connor | 2005-11-10 20:43:44 | Re: Performance of autovacuum and full vacuum of database |
Previous Message | Michael Schuerig | 2005-11-10 20:31:48 | Ordering and unicode |