Re: Suspicion of a compiler bug in clang: using ternary operator in ereport() - Mailing list pgsql-hackers

From Christian Kruse
Subject Re: Suspicion of a compiler bug in clang: using ternary operator in ereport()
Date
Msg-id 20140129203754.GE31325@defunct.ch
Whole thread Raw
In response to Re: Suspicion of a compiler bug in clang: using ternary operator in ereport()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Suspicion of a compiler bug in clang: using ternary operator in ereport()  (Christian Kruse <christian@2ndquadrant.com>)
Re: Suspicion of a compiler bug in clang: using ternary operator in ereport()  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Suspicion of a compiler bug in clang: using ternary operator in ereport()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

On 29/01/14 13:39, Tom Lane wrote:
> No, what I meant is that the ereport caller needs to save errno, rather
> than assuming that (some subset of) ereport-related subroutines will
> preserve it.
> […]

Your reasoning sounds quite logical to me. Thus I did a

grep -RA 3 "ereport" src/* | less

and looked for ereport calls with errno in it. I found quite a few,
attached you will find a patch addressing that issue.

Best regards,

--
 Christian Kruse               http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: review: psql command copy count tag
Next
From: Christian Kruse
Date:
Subject: Re: Suspicion of a compiler bug in clang: using ternary operator in ereport()