First a row, then the question.
archives=# select * from archives;
listname | received_date | header_date | subject
| author
|
headers
|
body
----------+------------------------+------------------------+----------+--------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
admin | 2001-09-03 22:37:19-04 | 2001-09-03 15:24:29-04 | Need Web |
Cheap@mail.web.net | From Cheap@mail.web.net Mon Sep 3 11:40:22
2001\015\012Received: from CheapWebPager.com Newsletter\015\012Date:
Mon, 03 Sep 01 14:24:29 EST\015\012From: Cheap@mail.web.net\015\012To:
webmaster@kalifornia.com\015\012Subject: Need Web\015\012 | This is test
text. a\\'one\\'b\012more test text. left slash \\\\, right slash
/.\012let\\'s embed a (\\\000\\\000) NULL. This should not break
things.\012--no more--\012-d\012
(1 row)
archives=# select * from archives where headers like '%To: webmaster%';
ERROR: Unable to identify an operator '~~' for types 'bytea' and 'unknown'
You will have to retype this query using an explicit cast
How should I be writing this so as to match rows where the headers
include 'To: webmaster'?
David