Re: Changing the Datatype from Bit to Boolean. - Mailing list pgsql-admin

From shammat@gmx.net
Subject Re: Changing the Datatype from Bit to Boolean.
Date
Msg-id 88c8494d-92fe-4fbd-bed7-0afd5ef423a1@gmx.net
Whole thread Raw
In response to Changing the Datatype from Bit to Boolean.  (Gambhir Singh <gambhir.singh05@gmail.com>)
List pgsql-admin
Gambhir Singh schrieb am 23.02.2025 um 06:56:
> Aurora PostgreSQL DB has a table in which one column has the
> datatype BIT(1). Now the requirement is that I have to change the
> datatype of that column from BIT to BOOLEAN. There are only a few
> rows in the table.
If you store 1 as true and 0 as false, you can use something like this:

alter table the_table
   alter the_column type boolean using (the_column = '1');




pgsql-admin by date:

Previous
From: Ron Johnson
Date:
Subject: Re: V12 to V16 Upgrade -- does size matters?
Next
From: Mauricio Fernandez
Date:
Subject: Re: Installing version other than the last one