Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2xph-0003vn-1X for pgsql-sql@arkaria.postgresql.org; Thu, 30 Dec 2021 15:59:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n2xp8-0007BT-Dw for pgsql-sql@arkaria.postgresql.org; Thu, 30 Dec 2021 15:58:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2xp8-0007BK-5A for pgsql-sql@lists.postgresql.org; Thu, 30 Dec 2021 15:58:38 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2xp1-000451-DT for pgsql-sql@lists.postgresql.org; Thu, 30 Dec 2021 15:58:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 1BUFwSJI2269505; Thu, 30 Dec 2021 10:58:28 -0500 From: Tom Lane To: aditya desai cc: pgsql-sql Subject: Re: ALTERING COLLATION In-reply-to: References: Comments: In-reply-to aditya desai message dated "Thu, 30 Dec 2021 13:12:24 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2269503.1640879908.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 30 Dec 2021 10:58:28 -0500 Message-ID: <2269504.1640879908@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk aditya desai writes: > I had to alter COLLATION of one of the table column as shown below due t= o > business requirements. > alter TABLE workflow alter status_id TYPE character varying(10) COLLATE= "C" > Is there any way to do this at server level? Where's the problem? test=3D# create table workflow(status_id character varying(10) collate "en= _US"); CREATE TABLE test=3D# \d workflow Table "public.workflow" Column | Type | Collation | Nullable | Default = -----------+-----------------------+-----------+----------+--------- status_id | character varying(10) | en_US | | = test=3D# alter TABLE workflow alter status_id TYPE character varying(10) = COLLATE "C"; ALTER TABLE test=3D# \d workflow Table "public.workflow" Column | Type | Collation | Nullable | Default = -----------+-----------------------+-----------+----------+--------- status_id | character varying(10) | C | | = regards, tom lane