From sandhyar@amiindia.co.in Mon Apr 10 09:37:21 2006 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 6C9CC11F6D15 for ; Mon, 10 Apr 2006 06:37:21 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0.002 X-Spam-Level: X-Spam-Status: No, score=0.002 required=5 tests=[HTML_MESSAGE=0.001, UNPARSEABLE_RELAY=0.001] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id flOnLMO-3k6w for ; Mon, 10 Apr 2006 06:37:13 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from venus.amiindia.co.in (unknown [203.199.198.234]) by postgresql.org (Postfix) with ESMTP id 3ED0411F68CA for ; Mon, 10 Apr 2006 06:37:13 -0300 (ADT) Received: from venus.amiindia.co.in (localhost.localdomain [127.0.0.1]) by venus.amiindia.co.in (8.12.11/8.12.11) with ESMTP id k3A9UbbU029629 for ; Mon, 10 Apr 2006 15:00:37 +0530 Received: from sandhyar (unknown [10.0.0.205])by venus.amiindia.co.in (Postfix) with ESMTP id 07B62332669for ; Mon, 10 Apr 2006 15:00:37 +0530 (IST) Message-ID: <00e301c65c83$3f49a520$cd00000a@sandhyar> From: "sandhya" To: "Postgres" Subject: alter column type Date: Mon, 10 Apr 2006 15:13:38 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00E0_01C65CB1.58648FB0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-imss-version: 2.5 X-imss-result: Passed X-imss-scores: Clean:81.29500 C:21 M:2 S:5 R:5 X-imss-settings: Baseline:5 C:3 M:3 S:4 R:3 (0.2500 0.7500) X-Archive-Number: 200604/86 X-Sequence-Number: 21255 This is a multi-part message in MIME format. ------=_NextPart_000_00E0_01C65CB1.58648FB0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 ------=_NextPart_000_00E0_01C65CB1.58648FB0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi..
  If i want to change the datatype of a column = in a=20 table.....What are all the thigs i need to take care off.
After somany records insertion if i change the = datatype of the=20 column..What will be the effect of it.
Please tell me /give suggestion what needs to be = cosider at=20 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=20 about?
 
Thank you,
Sandhya
 
 
 
 
 
------=_NextPart_000_00E0_01C65CB1.58648FB0-- From jnasby@pervasive.com Thu Apr 13 15:06:02 2006 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