Skip site navigation (1) Skip section navigation (2)

ADD COLUMN damage control

From: Diana Nemirovsky <diana(at)marinconsulting(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: ADD COLUMN damage control
Date: 2005-07-18 06:44:46
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
I have a about 20 or 30 tables in a database. All was working fine, my 
queries, my PHP front end. Then I did two things. First, I added columns 
onto each table as follows. I am showing the commands for just one table, 
but it was the same code for each table.

ALTER TABLE person ADD COLUMN record_created_by_user INT2;
ALTER TABLE person ADD COLUMN record_modified TIMESTAMP;
ALTER TABLE person ADD COLUMN record_modified_by_user INT2;

As you can see, there are no constraints or anything. Second, I added a 
trigger on the person table.

Then site-wide, things all broke. I deleted (cascade) the trigger, but what 
was breaking was across all tables, and not just on the tables touched by 
my trigger. Queries that used to work fine no longer do. Not having any 
other logical explanation, I looked up the VACUUM command, and tried that 
on each table. Same result. Things are broken all over the place. Is there 
something I need to do after adding columns to my tables? Or some other 
thing that could explain what has happened? I'm at a loss.

Thanks for any help or pointers.

Diana Nemirovsky
Marin Consulting, Inc.
770 Menlo Ave, Ste 223
Menlo Park, CA 94025
v (650) 617-8699
f (650) 833-0790 


pgsql-novice by date

Next:From: Reinhard HnatDate: 2005-07-18 09:49:30
Subject: Problem with starting Postgres
Previous:From: Michael FuhrDate: 2005-07-17 09:22:17
Subject: Re: rowtypes and functions

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group