Thread

Commits

  1. Put back mistakenly removed #include.

  2. Restructure polymorphic-type resolution in funcapi.c.

  1. implicit declaration of datumIsEqual in parse_coerce.c

    Tomas Vondra <tomas.vondra@2ndquadrant.com> — 2020-04-07T20:54:36Z

    Hi,
    
    Not sure what changed, but I'm seeing this failure:
    
    parse_coerce.c: In function ‘coerce_type’:
    parse_coerce.c:345:9: warning: implicit declaration of function ‘datumIsEqual’ [-Wimplicit-function-declaration]
       345 |    if (!datumIsEqual(newcon->constvalue, val2, false, newcon->constlen))
           |         ^~~~~~~~~~~~
    
    Not sure if this because of compiler version (I'm on gcc 9.2.1) or
    something else - I don't see any obvious changes to relevant parts of
    the code, but I haven't dug too much.
    
    Simply including 'utils/datum.h' resolves the issue.
    
    
    regards
    
    -- 
    Tomas Vondra                  http://www.2ndQuadrant.com
    PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
    
    
    
    
  2. Re: implicit declaration of datumIsEqual in parse_coerce.c

    Tom Lane <tgl@sss.pgh.pa.us> — 2020-04-07T21:16:58Z

    Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
    > Not sure what changed, but I'm seeing this failure:
    
    > parse_coerce.c: In function ‘coerce_type’:
    > parse_coerce.c:345:9: warning: implicit declaration of function ‘datumIsEqual’ [-Wimplicit-function-declaration]
    >    345 |    if (!datumIsEqual(newcon->constvalue, val2, false, newcon->constlen))
    >        |         ^~~~~~~~~~~~
    
    That's inside "#ifdef RANDOMIZE_ALLOCATED_MEMORY", which probably
    explains why most of us aren't seeing it.  My guess is somebody
    removed an #include without realizing that this chunk of code
    needed it.
    
    			regards, tom lane
    
    
    
    
  3. Re: implicit declaration of datumIsEqual in parse_coerce.c

    Michael Paquier <michael@paquier.xyz> — 2020-04-08T02:32:10Z

    On Tue, Apr 07, 2020 at 05:16:58PM -0400, Tom Lane wrote:
    > That's inside "#ifdef RANDOMIZE_ALLOCATED_MEMORY", which probably
    > explains why most of us aren't seeing it.  My guess is somebody
    > removed an #include without realizing that this chunk of code
    > needed it.
    
    [cough]
    
    commit: 4dbcb3f844eca4a401ce06aa2781bd9a9be433e9
    author: Tom Lane <tgl@sss.pgh.pa.us>
    date: Sat, 14 Mar 2020 14:42:22 -0400
    Restructure polymorphic-type resolution in funcapi.c.
    [...]
    @@ -26,7 +25,6 @@
     #include "parser/parse_relation.h"
     #include "parser/parse_type.h"
     #include "utils/builtins.h"
    -#include "utils/datum.h"
     #include "utils/lsyscache.h"
    --
    Michael
    
  4. Re: implicit declaration of datumIsEqual in parse_coerce.c

    Tom Lane <tgl@sss.pgh.pa.us> — 2020-04-08T02:39:30Z

    Michael Paquier <michael@paquier.xyz> writes:
    > On Tue, Apr 07, 2020 at 05:16:58PM -0400, Tom Lane wrote:
    >> That's inside "#ifdef RANDOMIZE_ALLOCATED_MEMORY", which probably
    >> explains why most of us aren't seeing it.  My guess is somebody
    >> removed an #include without realizing that this chunk of code
    >> needed it.
    
    > [cough]
    
    Bleagh.  Either of you want to put it back?  (Maybe with a comment
    this time, like "needed for datumIsEqual()".)
    
    Curiously, there are no buildfarm warnings about this, even though we have
    at least one member running with RANDOMIZE_ALLOCATED_MEMORY.  Wonder why?
    
    			regards, tom lane
    
    
    
    
  5. Re: implicit declaration of datumIsEqual in parse_coerce.c

    Noah Misch <noah@leadboat.com> — 2020-05-03T06:48:36Z

    On Tue, Apr 07, 2020 at 10:39:30PM -0400, Tom Lane wrote:
    > > On Tue, Apr 07, 2020 at 05:16:58PM -0400, Tom Lane wrote:
    > >> That's inside "#ifdef RANDOMIZE_ALLOCATED_MEMORY", which probably
    > >> explains why most of us aren't seeing it.  My guess is somebody
    > >> removed an #include without realizing that this chunk of code
    > >> needed it.
    
    > Curiously, there are no buildfarm warnings about this, even though we have
    > at least one member running with RANDOMIZE_ALLOCATED_MEMORY.  Wonder why?
    
    The RANDOMIZE_ALLOCATED_MEMORY buildfarm members use xlc, which disables this
    warning by default.  (Given flag -qinfo=pro, it would warn.)