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 20140129081248.GF24091@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()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

On 28/01/14 22:35, Tom Lane wrote:
> >> Absolutely.  Probably best to save errno into a local just before the
> >> ereport.
>
> > I think just resetting to edata->saved_errno is better and sufficient?
>
> -1 --- that field is nobody's business except elog.c's.

Ok, so I propose the attached patch as a fix.

Best regards,

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


Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Add min and max execute statement time in pg_stat_statement
Next
From: Rajeev rastogi
Date:
Subject: Re: Add min and max execute statement time in pg_stat_statement