From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Rowley <dgrowley(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)2ndquadrant(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, "Brightwell, Adam" <adam(dot)brightwell(at)crunchydatasolutions(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: replicating DROP commands across servers |
Date: | 2014-12-24 15:47:24 |
Message-ID: | 6756.1419436044@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
David Rowley <dgrowley(at)gmail(dot)com> writes:
> On 25 December 2014 at 00:34, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
>> I really wonder if we can't make msvc reliably recognize this kind of
>> scenario - especially this case is pretty trivial?
> The attached patch removes the warning, but likely can't be used in case
> someone somewhere is doing elog(var++, "my error");
Yeah, we're *not* doing that. There are definitely places where
ereport/elog are used with nonconstant elevel.
It's curious though that MSVC fails to notice that the variable never
changes. I wonder whether we could get away with changing the elog
macro to do
const int elevel_ = (elevel);
as ereport does, and whether it would help if so.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Petr Jelinek | 2014-12-24 15:55:52 | Re: Commit timestamp abbreviations |
Previous Message | Tom Lane | 2014-12-24 15:15:17 | Re: replicating DROP commands across servers |