Aaron Stone wrote:
Paul J Stevens <[EMAIL PROTECTED]> said:


Mikhail Ramendik wrote:

[snip]

This is the only part that, in case of a header search, uses the data from more than just the header. What is this for? Why do we have to search "children"?

[snip]

Shouldn't we restrict this looping over subparts to TEXT or BODY type
searches. In that case, with header-searches we can safely skip looping
over subparts.


I agree 100%. It would never occur to me to use a header search to find,
for example, a message that was included in a mailing list digest.

Also, I was thinking about the REGEXP idea with respect to parsing only a
subset of headers. REGEXP isn't universally support; we would need to do a
hack similar to the date function hack, where the db.c uses an external
symbol that is defined by the database shim as needed for that database.
It works well, but I wonder if it wouldn't be easier to just do this:

SELECT * FROM messageblks WHERE messageblk LIKE
'%From:[EMAIL PROTECTED]';

Since LIKE works everywhere, and doesn't fire up a regex engine... well,
benchmarking is in order, I think ;-)

Won't work. LIKE is like a multiline regexp. So you might do:

'%From: [EMAIL PROTECTED]' but
'%From:[EMAIL PROTECTED]' would match any messages that contain [EMAIL PROTECTED] in any header including and after the From: header.




--
  ________________________________________________________________
  Paul Stevens                                  mailto:[EMAIL PROTECTED]
  NET FACILITIES GROUP                     PGP: finger [EMAIL PROTECTED]
  The Netherlands________________________________http://www.nfg.nl

Reply via email to