Re: alter table

From: Andrew Gould <andrewgould(at)yahoo(dot)com>
To: sec <sec(at)artofit(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: alter table
Date: 2001-11-30 15:46:10
Message-ID: 20011130154610.20635.qmail@web13408.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yuri,

You are correct that the alter table syntax does not
support changing the data type of a column or dropping
a column.

I've never added a column with default values, so I
could be wrong here; but if your new column contains
integers, shouldn't the default value be mentioned
without the single quotes?

Best of luck,

Andrew Gould

--- "Yuri A. Kabaenkov" <sec(at)artofit(dot)com> wrote:
> Hello,
>
> I've read documentation on alter table syntax
> and doesn't find
> anything about change column type or drop
> column.
>
> Also when i add column by command
> alter table test add column a integer not null
> default '10'
>
> It adds column but doesn't set default value.
>
> How can i fix it?
>
>
>
> ------------
> With respect,
> Yuri A. Kabaenkov
> hellman(at)artofit(dot)com
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the
> unregister command
> (send "unregister YourEmailAddressHere" to
majordomo(at)postgresql(dot)org)

__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

In response to

  • alter table at 2001-11-30 15:22:56 from Yuri A. Kabaenkov

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-11-30 16:16:34 Re: error on drop table
Previous Message Paul Stavrides 2001-11-30 15:37:32 Re: Initdb failure with PG 7.1.3 on RH 7.1...