Re: [HACKERS] compiler warning with VS 2017 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] compiler warning with VS 2017
Date
Msg-id 2326.1493996200@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] compiler warning with VS 2017  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Responses Re: [HACKERS] compiler warning with VS 2017  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
List pgsql-hackers
Petr Jelinek <petr.jelinek@2ndquadrant.com> writes:
> On 05/05/17 06:50, Tom Lane wrote:
>> Actually, looking around a bit there, it's not even clear why
>> we should be booby-trapping the value of an unchanged column in
>> the first place.  So I'd say that not only is the code dubious
>> but the comment is inadequate too.

> Hmm, as far as I can recollect this is just leftover debugging code that
> was intended to help ensure that we are checking the "changed"
> everywhere we are supposed to (since I changed handling of these
> structured quite a bit during development). Should be changed to NULL,
> that's what we usually do in this type of situation.

So the comment should be something like "if the column is unchanged,
we should not attempt to access its value beyond this point.  To
help catch any such attempts, set the string to NULL" ?
        regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] logical replication and PANIC during shutdowncheckpoint in publisher
Next
From: Petr Jelinek
Date:
Subject: Re: [HACKERS] compiler warning with VS 2017