Comparing text field - Mailing list pgsql-general

From Nik
Subject Comparing text field
Date
Msg-id 1144956008.710609.35530@e56g2000cwe.googlegroups.com
Whole thread Raw
Responses Re: Comparing text field  ("chris smith" <dmagick@gmail.com>)
Re: Comparing text field  (Nirmalya Lahiri <nirmalyalahiri@yahoo.com>)
List pgsql-general
I am trying to compare a large string (that has new line characters in
it) to the contents of the text field (which also has new line
characters in it) and it is not behaving as expected.

For example I have the following record in the database:
id=83
message=VAC153-683-685-131830-
/O.NEW.KLWX.SV.W.0022.060413T1742Z-060413T1830Z/
BULLETIN - EAS ACTIVATION REQUESTED
SEVERE THUNDERSTORM WARNING
NATIONAL WEATHER SERVICE BALTIMORE MD/WASHINGTON DC
142 PM EDT THU APR 13 2006
THE NATIONAL WEATHER SERVICE IN STERLING VIRGINIA HAS ISSUED A
* SEVERE THUNDERSTORM WARNING

If I do the following query
SELECT id FROM table1 WHERE message='VAC153-683-685-131830-
/O.NEW.KLWX.SV.W.0022.060413T1742Z-060413T1830Z/
BULLETIN - EAS ACTIVATION REQUESTED
SEVERE THUNDERSTORM WARNING
NATIONAL WEATHER SERVICE BALTIMORE MD/WASHINGTON DC
142 PM EDT THU APR 13 2006
THE NATIONAL WEATHER SERVICE IN STERLING VIRGINIA HAS ISSUED A
* SEVERE THUNDERSTORM WARNING'

I get no results back, even though the message is equivalent. How
should I perform this comparison so that the above query returns id=83?

Thanks.


pgsql-general by date:

Previous
From: "Greg Sabino Mullane"
Date:
Subject: Re: enforce naming convention
Next
From: "Mavinakuli, Prasanna (STSD)"
Date:
Subject: HUGE Stack space is gettiing consumed