Search Postgresql Archives

Re: casting from integer to boolean

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 26 Mar 2008 22:46:08 +0000,
Sam Mason <sam@xxxxxxxxxxxxx> wrote:

[...]

> You could turn the problem around and make the bool columns into ints
> (which should be a simple search-and-replace, I hope) and then write
> something (again hopefully simple) to turn them all back into bools.
> I.e. lots of:

>   ALTER TABLE my_table ALTER var_bool TYPE bool USING var_bool::bool;


Yes! Good idea, I think I can collect the names of the tables and
columns with boolean fields and then use that as you say.  Thanks
everybody.


-- 
Seb


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux