agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
ALTERING COLLATION
2+ messages / 2 participants
[nested] [flat]

* ALTERING COLLATION
@ 2021-12-30 07:42  aditya desai <admad123@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: aditya desai @ 2021-12-30 07:42 UTC (permalink / raw)
  To: pgsql-sql <pgsql-sql@lists.postgresql.org>

Hi,
I had to alter COLLATION of one of the table column as shown below due to
business requirements.

alter TABLE workflow alter status_id  TYPE character varying(10) COLLATE "C"

Is there any way to do this at server level?

Regards,
Aditya.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: ALTERING COLLATION
@ 2021-12-30 15:58  Tom Lane <tgl@sss.pgh.pa.us>
  parent: aditya desai <admad123@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2021-12-30 15:58 UTC (permalink / raw)
  To: aditya desai <admad123@gmail.com>; +Cc: pgsql-sql <pgsql-sql@lists.postgresql.org>

aditya desai <admad123@gmail.com> writes:
> I had to alter COLLATION of one of the table column as shown below due to
> 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=# create table workflow(status_id character varying(10) collate "en_US");
CREATE TABLE
test=# \d workflow
                      Table "public.workflow"
  Column   |         Type          | Collation | Nullable | Default 
-----------+-----------------------+-----------+----------+---------
 status_id | character varying(10) | en_US     |          | 

test=# alter TABLE workflow alter status_id  TYPE character varying(10) COLLATE "C";
ALTER TABLE
test=# \d workflow
                      Table "public.workflow"
  Column   |         Type          | Collation | Nullable | Default 
-----------+-----------------------+-----------+----------+---------
 status_id | character varying(10) | C         |          | 


			regards, tom lane





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-12-30 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-12-30 07:42 ALTERING COLLATION aditya desai <admad123@gmail.com>
2021-12-30 15:58 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox