On Thu, Aug 26, 2010 at 1:47 PM,  <wei...@lycos.com> wrote:
> I know what I need to do in the application for the change. My problem is 
> that I don't know a good process to make a such change in PostgreSQL. Since 
> the application is in production already, do I need to create another field 
> or convert the data from the boolean field into the new field?

recent versions of postgres allow you to do transformations w/alter table:

alter table foo alter bool_col type text using case when bool_col then
'foo' else 'bar' end;

expression can hook to a function if you want to do something really
complex (yes this is awesome) :-)

merlin

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

Reply via email to