Evolving databases (eg deleting columns)

From: "Christian H(dot) Stork" <cstork(at)ics(dot)uci(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Evolving databases (eg deleting columns)
Date: 2002-07-26 00:19:18
Message-ID: 20020726001918.GA14450@ics.uci.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi everyone,

I'm new to databases and PostgreSQL in particular. Currently, I'm
playing around with some test DBs, which already contain some valuable
data.

My question: How can I evolve databases (ie deleting columns,
adding/changing/removing constraints, etc)?

I tried using pg_dump and editing the dump file. While reading the dump
file helped me to understand how I could do it, the editing of the data
was quite cumbersome.

I also know about ALTER, but there seems to be no way to delete columns.
Which means that I'd have to create a new table, populate it, but what
do I do with other tables that used the original table as FOREIGN KEYS?
These kinds of problems make me suspect that there are other ways of
evolving tables.

I was just wondering how other users of PostgreSQL solve this problem.
What are good recipes to evolve databases?

Any hints welcome! Thanks,
--
Chris Stork (PhD student at UC Irvine) http://www.ics.uci.edu/~cstork/
OpenPGP fingerprint: B08B 602C C806 C492 D069 021E 41F3 8C8D 50F9 CA2F

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christian H. Stork 2002-07-26 00:22:27 Re: List tables in the database
Previous Message Varsha Agarwal 2002-07-26 00:10:32 List tables in the database