[Dbmail-dev] [DBMail 0000285]: Double quotes break PostgreSQL query

2005-11-28 Thread bugtrack
The following issue has been SUBMITTED. == http://www.dbmail.org/mantis/view.php?id=285 == Reported By:stevo_inco Assigned To:

[Dbmail-dev] [DBMail 0000285]: Double quotes break PostgreSQL query

2005-11-29 Thread bugtrack
The following issue has been RESOLVED. == http://www.dbmail.org/mantis/view.php?id=285 == Reported By:stevo_inco Assigned To:

Re: [Dbmail-dev] [DBMail 0000285]: Double quotes break PostgreSQL query

2005-12-11 Thread Kevin Brown
[EMAIL PROTECTED] wrote: > My IMAP client fails when I try to check my account (different clients > exhibit different behaviors), and I find a failed SQL query in my logs. > > The query is done using double-quotes. At jnorell's recomendation, I ran > the query by hand using single-quotes, and it w

Re: [Dbmail-dev] [DBMail 0000285]: Double quotes break PostgreSQL query

2005-12-11 Thread Aaron Stone
On Sat, 2005-12-10 at 19:59 -0800, Kevin Brown wrote: [snip] > h = g_list_join((GList *)headers,"'),upper('"); > g_string_printf(q,"SELECT physmessage_id,headername,headervalue " > "FROM %sheadervalue v " > "JOIN %sheadername n ON v.headername_id=n.id " >

Re: [Dbmail-dev] [DBMail 0000285]: Double quotes break PostgreSQL query

2005-12-12 Thread Kevin Brown
Aaron Stone wrote: > On Sat, 2005-12-10 at 19:59 -0800, Kevin Brown wrote: > [snip] > > > h = g_list_join((GList *)headers,"'),upper('"); > > g_string_printf(q,"SELECT physmessage_id,headername,headervalue " > > "FROM %sheadervalue v " > > "JOIN %sheadername n O

Re: [Dbmail-dev] [DBMail 0000285]: Double quotes break PostgreSQL query

2005-12-12 Thread Aaron Stone
On Mon, 2005-12-12 at 09:08 -0800, Kevin Brown wrote: > Aaron Stone wrote: [snip] > > Should we also add / change the indexes to uppercase? > > Hmmprobably, though only PostgreSQL allows you to create > functional indexes, so it's the only engine that'll benefit from that. > > The index creat

Re: [Dbmail-dev] [DBMail 0000285]: Double quotes break PostgreSQL query

2005-12-12 Thread Paul J Stevens
Kevin Brown wrote: > Also, since "lower" is also ANSI-standard and supported by all three > databases, we should probably use that instead of "upper", since the > data will be more readable should we decide to store the data in > case-converted form some time in the future. So, s/upper/lower/g i

Re: [Dbmail-dev] [DBMail 0000285]: Double quotes break PostgreSQL query

2005-12-12 Thread Aaron Stone
I disagree; we should let the database do the lowercasing so that it matches exactly with how the database does the lowercase index. Uh, unless it's required that headers are US-ASCII < 128? If so, then it's the old "six of one, half dozen of the other..." Aaron On Mon, 2005-12-12 at 21:45 +0100

Re: [Dbmail-dev] [DBMail 0000285]: Double quotes break PostgreSQL query

2005-12-13 Thread Paul J Stevens
>From rfc2822: 2.2. Header Fields Header fields are lines composed of a field name, followed by a colon (":"), followed by a field body, and terminated by CRLF. A field name MUST be composed of printable US-ASCII characters (i.e., characters that have values between 33 and 126, inclu

Re: [Dbmail-dev] [DBMail 0000285]: Double quotes break PostgreSQL query

2005-12-13 Thread Aaron Stone
On Tue, 2005-12-13 at 08:53 +0100, Paul J Stevens wrote: > >From rfc2822: > > 2.2. Header Fields > >Header fields are lines composed of a field name, followed by a colon >(":"), followed by a field body, and terminated by CRLF. A field >name MUST be composed of printable US-ASCII cha