Re: Escaping underscores in LIKE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: dev(at)archonet(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Escaping underscores in LIKE
Date: 2001-03-08 15:32:08
Message-ID: 25676.984065528@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

dev(at)archonet(dot)com writes:
> Am I doing something stupid trying to escape an underscore in LIKE?

You need more backslashes. Don't forget the string-literal parser eats
one level of backslashes, before LIKE ever gets to see the pattern.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message chris markiewicz 2001-03-08 15:39:26 RE: length of insert stmt?
Previous Message Tom Lane 2001-03-08 15:27:32 Re: length of insert stmt?