Re: alter table - Mailing list pgsql-general

From Andrew Gould
Subject Re: alter table
Date
Msg-id 20011130154610.20635.qmail@web13408.mail.yahoo.com
Whole thread Raw
In response to alter table  ("Yuri A. Kabaenkov" <sec@artofit.com>)
List 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@artofit.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@artofit.com
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the
> unregister command
>     (send "unregister YourEmailAddressHere" to
majordomo@postgresql.org)


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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Initdb failure with PG 7.1.3 on RH 7.1...
Next
From: Tom Lane
Date:
Subject: Re: Initdb failure with PG 7.1.3 on RH 7.1...