Re: [GENERAL] alter table ?

From: Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il>
To: Kevin Heflin <kheflin(at)shreve(dot)net>
Cc: "PGSQL-General (E-mail)" <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] alter table ?
Date: 1998-11-15 12:06:29
Message-ID: l03110704b2747312d041@[147.233.159.109]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 12:18 +0200 on 13/11/98, Kevin Heflin wrote:

> Yea, I did that, but I guess what I'm looking for, was that when ever
> anything was added to the table. Regardless of whether or not the
> spamblock was specified, it would be set to 'TRUE'

I guess adding constraints in alter statement is something to be placed in
Postgres's todo list if it is not there already.

But personally, I prefer doing this with "definition file" - SQL files
which define all the tables in my database.

In case of alteration, I dump all my tables and sequences, re-run the
creation file (which drops all tables and redefines everything), and reload
the tables and sequences - possibly adding data within the dump files to
reflect the addition or removal of columns.

This way, you can always recreate your database, create a second mirror, a
production database, etc. - and you can fill the "definition file" with
comments which will help you understand what you meant a year afterwards.

It's a tradition I kept from the time we used Oracle in one of my former
jobs. I think it's a practice taught in basic Oracle training, but it's
good for any database (that supports SQL/DDL scripts).

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message 송기원 1998-11-16 02:06:06 how to use "text" type data
Previous Message Sergei Chernev 1998-11-14 06:33:53 RE: [GENERAL] PL/pgSQL