Re: [exim] Bug in exim 4.90 postgresql

Etusivu
Poista viesti
Vastaa
Lähettäjä: Jasen Betts
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [exim] Bug in exim 4.90 postgresql
On 2017-12-25, James <list@???> wrote:
> On 24/12/2017 15:58, Jeremy Harris wrote:
>
> Pre-Script: the elves have been busy and I am now getting user
> exim-users email but still no bugzilla account.
>
>> On 23/12/17 10:22, James wrote:
>>> I have 3 times used the "Create a new Bugzilla account" and written to
>>> the admin. Nothing back so here is my report:
>>>
>>>
>>> There is a bug in exim 4.90 postgresql, fix:
>>>
>>> --- ../original/src/lookups/pgsql.c    2017-12-12 22:14:38.000000000 +0000
>>> +++ src/lookups/pgsql.c    2017-12-22 19:31:06.621334570 +0000
>>> @@ -329,7 +329,7 @@
>>>      result = string_catn(result, US"\n", 1);

>>>
>>>    if (num_fields == 1)
>>> -    result = string_catn(NULL,
>>> +    result = string_catn(result,
>>>      US PQgetvalue(pg_result, i, 0), PQgetlength(pg_result, i, 0));
>>>    else
>>>      {

>>
>> Do you have a testcase, or description of the effect?
>
> Compare with 4.89.1 and/or just consider the code.
>      for (tuple : query) result = tuple;
> was and should be:
>      for (tuple : query) result += tuple;
> "result" should "string_catn" to self not null.

>
>
> Any multi-line query with one per line only uses the last line

[snip]

(assuming you mean multi-row result with a single column)

it seems to work here:

/usr/sbin/exim -be '${lookup pgsql{ select generate_series(1,10) }};';
1
2
3
4
5
6
7
8
9
10

but this is a failry old version of exim, can you test that?

--
This email has not been checked by half-arsed antivirus software