Postgresql

Hi,

We have 2 servers having the same code on both. On one of them interrogation on a table returns t/f for boolean true/false and on the other it returns 0/1. Do you have any idea why this happens? Maybe a yii setting or a server setting?

Thanks

Hi,

i had similar problem some weeks ago, it came from a update of php if i remember well.

I haven’t notice which version it concerns, but i use SQL to solve it:




UPDATE pg_cast SET castcontext = 'i' WHERE oid IN (

	SELECT c.oid

	FROM pg_cast c

	inner join pg_type src ON src.oid = c.castsource

	inner join pg_type tgt ON tgt.oid = c.casttarget

	WHERE src.typname LIKE 'int%' AND tgt.typname LIKE 'bool%'

)



I’m not sure, of course, that this is exactly the same problem as yours.