From patemukund@yahoo.com Thu Dec 12 06:39:25 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id BBC28476D5C for ; Thu, 12 Dec 2002 01:39:25 -0500 (EST) Received: from web13114.mail.yahoo.com (web13114.mail.yahoo.com [216.136.174.182]) by postgresql.org (Postfix) with SMTP id E270B475F1B for ; Thu, 12 Dec 2002 01:39:14 -0500 (EST) Message-ID: <20021212063914.50854.qmail@web13114.mail.yahoo.com> Received: from [202.144.109.226] by web13114.mail.yahoo.com via HTTP; Wed, 11 Dec 2002 22:39:14 PST Date: Wed, 11 Dec 2002 22:39:14 -0800 (PST) From: Mukund Pate To: pgsql-admin@postgresql.org Cc: mukundpate@rediffmail.com MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-762086988-1039675154=:50830" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/166 X-Sequence-Number: 6661 --0-762086988-1039675154=:50830 Content-Type: text/plain; charset=us-ascii hello, how to modify the datatype of column in a table? i have created table with one coulmn datatype is varchar(200) so i would like to change to text datatype thanks in advance mukund --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-762086988-1039675154=:50830 Content-Type: text/html; charset=us-ascii

hello,

how to modify the datatype of column in a table?

i have created table with one coulmn datatype is varchar(200) so i  would like to change to text datatype

thanks in advance

mukund



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-762086988-1039675154=:50830-- From xzilla@users.sourceforge.net Thu Dec 12 19:50:51 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DDB194760EF for ; Thu, 12 Dec 2002 14:50:51 -0500 (EST) Received: from localhost.localdomain (unknown [65.217.53.66]) by postgresql.org (Postfix) with ESMTP id 155FB475EF0 for ; Thu, 12 Dec 2002 14:50:51 -0500 (EST) Received: from thorn.mmrd.com (thorn.mmrd.com [172.25.10.100]) by localhost.localdomain (8.12.5/8.12.5) with ESMTP id gBCK1Z6P014360; Thu, 12 Dec 2002 15:01:35 -0500 Received: from gnvex001.mmrd.com (gnvex001.mmrd.com [192.168.3.55]) by thorn.mmrd.com (8.11.6/8.11.6) with ESMTP id gBCJopj01602; Thu, 12 Dec 2002 14:50:51 -0500 Received: from camel.mmrd.com ([172.25.5.213]) by gnvex001.mmrd.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id XX5JX2N8; Thu, 12 Dec 2002 14:50:50 -0500 Subject: Re: From: Robert Treat To: Mukund Pate Cc: pgsql-admin@postgresql.org, mukundpate@rediffmail.com In-Reply-To: <20021212063914.50854.qmail@web13114.mail.yahoo.com> References: <20021212063914.50854.qmail@web13114.mail.yahoo.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 12 Dec 2002 14:50:50 -0500 Message-Id: <1039722650.3562.67.camel@camel> Mime-Version: 1.0 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/170 X-Sequence-Number: 6665 On Thu, 2002-12-12 at 01:39, Mukund Pate wrote: > hello, > > how to modify the datatype of column in a table? > > i have created table with one coulmn datatype is varchar(200) so i > would like to change to text datatype > You will need to recreate the table. Robert Treat From xzilla@users.sourceforge.net Thu Dec 12 21:07:01 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B3F1C475E24 for ; Thu, 12 Dec 2002 16:07:01 -0500 (EST) Received: from localhost.localdomain (unknown [65.217.53.66]) by postgresql.org (Postfix) with ESMTP id 3025B476DBA for ; Thu, 12 Dec 2002 16:06:40 -0500 (EST) Received: from thorn.mmrd.com (thorn.mmrd.com [172.25.10.100]) by localhost.localdomain (8.12.5/8.12.5) with ESMTP id gBCLHO6P014781; Thu, 12 Dec 2002 16:17:25 -0500 Received: from gnvex001.mmrd.com (gnvex001.mmrd.com [192.168.3.55]) by thorn.mmrd.com (8.11.6/8.11.6) with ESMTP id gBCL6dj03501; Thu, 12 Dec 2002 16:06:40 -0500 Received: from camel.mmrd.com ([172.25.5.213]) by gnvex001.mmrd.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id XX5JX28B; Thu, 12 Dec 2002 16:06:38 -0500 Subject: Re: From: Robert Treat To: Robert Treat Cc: Mukund Pate , pgsql-admin@postgresql.org, mukundpate@rediffmail.com In-Reply-To: <1039722650.3562.67.camel@camel> References: <20021212063914.50854.qmail@web13114.mail.yahoo.com> <1039722650.3562.67.camel@camel> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 12 Dec 2002 16:06:39 -0500 Message-Id: <1039727199.3562.72.camel@camel> Mime-Version: 1.0 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/171 X-Sequence-Number: 6666 On Thu, 2002-12-12 at 14:50, Robert Treat wrote: > On Thu, 2002-12-12 at 01:39, Mukund Pate wrote: > > hello, > > > > how to modify the datatype of column in a table? > > > > i have created table with one coulmn datatype is varchar(200) so i > > would like to change to text datatype > > > > You will need to recreate the table. > > Robert Treat Actually, I should point out that you can do an alter table add col2 text, update table set col2 = col1, update col1 set = NULL, rename col1 coldepricated, rename col2 to col1. If your in 7.3 you can drop coldepricated too. Sorry for the weak answer before. Robert Treat