Re: Bug in 7.2.1? -- ERROR: Adding columns with defaults is not implemented.

From: nconway(at)klamath(dot)dyndns(dot)org (Neil Conway)
To: ad wolf <adwolf1(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Bug in 7.2.1? -- ERROR: Adding columns with defaults is not implemented.
Date: 2002-07-08 18:23:34
Message-ID: 20020708182334.GC3358@klamath.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Jul 06, 2002 at 05:33:29PM -0700, ad wolf wrote:
> ERROR: Adding columns with defaults is not implemented.
> Add the column, then use ALTER TABLE SET DEFAULT.
>
> My question is two-fold -- first, is this new behavior a feature, or a
> bug?

IIRC, it's a feature -- I think it was always broken, we just tell you
about it now.

> I'd like to stick with 7.2.1, but this new behavior is making it
> difficult for me. I can't simply drop & recreate all my tables just
> to add a column!

Read the error message: it says that you simply need to execute 2
commands: ALTER TABLE ADD COLUMN, followed by ALTER TABLE SET DEFAULT.

Cheers,

Neil

--
Neil Conway <neilconway(at)rogers(dot)com>
PGP Key ID: DB3C29FC

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christoph Dalitz 2002-07-08 18:23:53 Re: Linux 7.1 dependency problems
Previous Message Neil Conway 2002-07-08 18:21:13 Re: PostgreSQL doesn't use indexes even is enable_seqscan = off