Re: [GENERAL] Alter Columns with Triggers

2011-07-12 Thread Sim Zacks
I don't recall any problems with functions or triggers, in my experience the problems are with the views. Any views that are on the table must be recreated. In any case, I wrote a function a while back that can be fairly easily modified to do what you want. My function is for modifying a vi

Re: [GENERAL] Alter Columns with Triggers

2011-07-12 Thread Craig Ringer
On 12/07/2011 9:23 AM, Adrian Parker wrote: Is there a quick and easy fix? Currently I'm copying/pasting the drop/create statements from pgadmin (its very slow and error prone) and putting them in my python source. I don't know about "quick and easy", but you can get the trigger function source

[GENERAL] Alter Columns with Triggers

2011-07-12 Thread Adrian Parker
Hello. I'm quite new to Postgres. I've just been assigned the task of changing 300+ Double Precision columns, spread out over 30+ tables, to be of type Numeric(100, 3). Many of the columns have one or more triggers/functions on them. The alterations will run from a python program acting as a datab