adding default values doesn't work

From: Kevin L <kevinsl(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: adding default values doesn't work
Date: 2001-03-26 19:20:22
Message-ID: 20010326192022.72244.qmail@web9604.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi. I'm running Postgres 6.5.3 and want to add a column with
"default 0" to an existing table.

alter table <table> add column col int4 default 0;

does not work. I've also tried modifying the system table,
pg_attrdef, but that does not work either. I don't want to drop
and recreate the table.

Any ideas anyone?

thanks!

-Kevin

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2001-03-26 19:33:11 Re: Patch (tiny): \cd (change dir) for psql [with feedback]
Previous Message Christian Marschalek 2001-03-26 19:10:52 RE: PostgreSQL under Windows?