Partitioning functions - Mailing list pgsql-general

From Mikael Carneholm
Subject Partitioning functions
Date
Msg-id 7F10D26ECFA1FB458B89C5B4B0D72C2B0A01D5@sesrv12.wirelesscar.com
Whole thread Raw
List 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.carneholm@wirelesscar.com
Website www.wirelesscar.com
Telematics made easy


Attachment

pgsql-general by date:

Previous
From: Aly Dharshi
Date:
Subject: Re: [ANNOUNCE] PostgreSQL 8.1.0 RPMs are available for
Next
From: "Matthew T. O'Connor"
Date:
Subject: Re: Performance of autovacuum and full vacuum of database