From: | "Contact" <contact(at)ar-sd(dot)net> |
---|---|
To: | "Chitta Ranjan Mishra" <c_r_mishra(at)yahoo(dot)co(dot)in>, <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Help---- Urgent |
Date: | 2003-12-11 15:24:06 |
Message-ID: | 003201c3bffa$d3c35930$0b00a8c0@andyy |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Create a new column
alter <tablename> add column <newcolname> varchar(25);
Then copy the old column into the new column:
update <tablename> set <newcolname> = <oldcolname>;
Drop the last column:
alter <tablename> drop column <oldcolname>;
Rename the column:
alter <tablename> rename column <newcolname> to <oldcolname>;
Take care for INDEXES if there are any.
This should do it.
Best regards.
----- Original Message -----
From: "Chitta Ranjan Mishra" <c_r_mishra(at)yahoo(dot)co(dot)in>
To: <pgsql-admin(at)postgresql(dot)org>
Sent: Thursday, December 11, 2003 7:19 AM
Subject: [ADMIN] Help---- Urgent
> Dear Sir,
> I wnat to alter the size of one of the column of a
> table. How to do this in Postgres ? Plz help me.
> It's very urgent...
>
> I tried with the following syntax :
> but it failed....
>
> alter table tablename modify(coumnname varchar(25));
>
> it's very urgnet...plz reply soon..
>
> Thanking you,
> Regds
> C.R.Mishra
>
>
>
>
> ________________________________________________________________________
> Yahoo! India Mobile: Download the latest polyphonic ringtones.
> Go to http://in.mobile.yahoo.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
From | Date | Subject | |
---|---|---|---|
Next Message | arnaud Betoule | 2003-12-11 15:27:25 | PostgreSQL features |
Previous Message | Tom Lane | 2003-12-11 15:01:08 | Re: Running Postgres Daemons with same data files |