Forum OpenACS Q&A: Response to stumped on a postgresql query ... using the || operator for types char and bool

Hi Matt,

PG boolean types can't be casted to other types - instead you have to use a CASE statement.

select role || ' ' || case when public_role_p then 't' else 'f' end as role_details,
...
PG Docs Reference