'how does openGauss deal with the comparision between varchar and int

For example the sql queries:

select * from tbl where tbl_col = false;

or

select * from tbl where tbl_col = 0;

where the tbl_col is text or varchar. Why is the where condition always TRUE?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source