<div class="WordSection1"><p class="MsoPlainText">Hi,<p class="MsoPlainText"> <p class="MsoPlainText">I am a newbie to
PostgreSQLand was wondering about the following behaviour.<p class="MsoPlainText"> <p class="MsoPlainText"> <p
class="MsoPlainText">SELECTtrue WHERE 1 = '1'; <-- Returns true <p class="MsoPlainText"> <p
class="MsoPlainText">SELECTtrue WHERE 1 BETWEEN '0' and '2'; <-- Returns true<p class="MsoPlainText"> <p
class="MsoPlainText">SELECTtrue WHERE 1 IS DISTINCT FROM '2'; <-- Returns true<p class="MsoPlainText"> <p
class="MsoPlainText">SELECTtrue WHERE 1 LIKE '1'; <-- Returns 'operator does not exist' Error<p
class="MsoPlainText"> <pclass="MsoPlainText">SELECT true WHERE '1' LIKE 1; <-- Returns 'operator does not exist'
Error<pclass="MsoPlainText"> <p class="MsoPlainText"> <p class="MsoPlainText"> <p class="MsoPlainText">The first three
querieswork because of the implicit cast whereas the 'LIKE' is not using implicit cast. <p class="MsoPlainText"> <p
class="MsoPlainText">Canyou please help me understand why 'LIKE' does not use implicit cast ? <p class="MsoNormal"> <p
class="MsoNormal"> <pclass="MsoNormal"><span style="mso-fareast-language:EN-AU"> </span><p class="MsoNormal"><span
style="mso-fareast-language:EN-AU">BestRegards,</span><p class="MsoNormal"><span
style="mso-fareast-language:EN-AU">Vaishnavi</span><pclass="MsoNormal"> </div>