"Anton Melser" <melser(dot)anton(at)gmail(dot)com> writes:
> ERROR: operator is not unique: boolean = integer
> I get this whether castcontext is 'a' or 'i'.
If you make both cast directions the same priority then the system has
no basis for choosing bool = bool over int = int or vice versa. Try
making one direction 'i' and the other not. I'm not sure which one
ought to be 'i', really --- it depends a lot on the details of the
queries you are trying to make work.
regards, tom lane