Hi,
I am a newbie to PostgreSQL and was wondering about the following
behaviour.
SELECT true WHERE 1 = '1'; <-- Returns true
SELECT true WHERE 1 BETWEEN '0' and '2'; <-- Returns true
SELECT true WHERE 1 IS DISTINCT FROM '2'; <-- Returns true
SELECT true WHERE 1 LIKE '1'; <-- Returns 'operator does not exist'
Error
SELECT true WHERE '1' LIKE 1; <-- Returns 'operator does not exist'
Error
The first three queries work because of the implicit cast whereas the
'LIKE' is not using implicit cast.
Can you please help me understand why 'LIKE' does not use implicit cast
?
Best Regards,
Vaishnavi