Monthly Archives: June 2011

SED One liners

FILE SPACING: # double space a file sed G # double space a file which already has blank lines in it. Output file # should contain no more than one blank line between lines of text. sed ‘/^$/d;G’ # triple … Continue reading

Posted in Uncategorized | Leave a comment

Dynamic trigger function for Table Partitioning with Execute

Dynamic Partition creation and insertion CREATE TABLE footest ( foo_id integer NOT NULL, blaa_id integer NOT NULL, blaa_num integer NOT NULL, foo_num integer NOT NULL, createdatetime timestamp with time zone DEFAULT now() ); CREATE TABLE footest_1to50k ( CHECK ( foo_id … Continue reading

Posted in Uncategorized | Leave a comment

Postgresql Hot Standby Replication

1. Install postgres in the primary and standby server as usual. This requires only configure, make and make install. 2. Create the initial database cluster in the primary server as usual, using initdb. 3. Set up connections and authentication so that the standby server can successfully connect to … Continue reading

Posted in Uncategorized