X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id D8BE711F6539 for ; Thu, 13 Apr 2006 12:06:02 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.25 X-Spam-Level: X-Spam-Status: No, score=-2.25 required=5 tests=[AWL=0.349, BAYES_00=-2.599] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id exZGaSpX5jcU for ; Thu, 13 Apr 2006 12:05:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 970AA11F677A for ; Thu, 13 Apr 2006 12:05:53 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 8D14D56423; Thu, 13 Apr 2006 10:05:52 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Thu, 13 Apr 2006 10:05:51 -0500 Date: Thu, 13 Apr 2006 10:05:51 -0500 From: "Jim C. Nasby" To: sandhya Cc: Postgres Subject: Re: alter column type Message-ID: <20060413150551.GR49405@pervasive.com> References: <00e301c65c83$3f49a520$cd00000a@sandhyar> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00e301c65c83$3f49a520$cd00000a@sandhyar> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060413:sandhyar@amiindia.co.in::RmZqmwvtVRJljT+2:00000000000000 0000000000000000000000002+YA X-Hashcash: 1:20:060413:pgsql-admin@postgresql.org::KW7ZKvkQ35R4Rwv6:00000000000 0000000000000000000000004UtB X-Archive-Number: 200604/121 X-Sequence-Number: 21290 About the only thing you need to consider is that changing the type of a column will re-write the entire table, and I'm pretty sure it will hold an exclusive lock during that process. On Mon, Apr 10, 2006 at 03:13:38PM +0530, sandhya wrote: > Hi.. > If i want to change the datatype of a column in a table.....What are all the thigs i need to take care off. > After somany records insertion if i change the datatype of the column..What will be the effect of it. > Please tell me /give suggestion what needs to be cosider at the time of changing column type of a table. > > Incase of int to char/varchar/text/ etc. > What are the different datatypes we should think about? > > Thank you, > Sandhya > > > > -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461