Re: Comparing text field

From: "Nik" <XLPizza(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Comparing text field
Date: 2006-04-16 20:00:29
Message-ID: 1145217629.428952.31320@u72g2000cwu.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

It is possible that one had /r/n and the other just /n. I was doing the
comparison using psql.

The issue was not using LIKE and %.

I resolved the problem by removing chr(13) from both sides. So my
working query was had a where clause like this:

WHERE REPLACE(message, chr(13), '') = REPLACE('<long string>', chr(13),
'')

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-04-16 20:32:25 Re: Query runs fast or slow
Previous Message Andreas Kretschmer 2006-04-16 17:48:13 Re: inet value validation