Re: pgsql: Cache by-reference missing values in a long lived context - Mailing list pgsql-committers

From Andrew Dunstan
Subject Re: pgsql: Cache by-reference missing values in a long lived context
Date
Msg-id ba2150c1-8485-6597-fafe-4fcd39e49c28@dunslane.net
Whole thread Raw
In response to Re: pgsql: Cache by-reference missing values in a long lived context  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql: Cache by-reference missing values in a long lived context
List pgsql-committers


On 2023-08-24 Th 11:27, Tom Lane wrote:
Andrew Dunstan <andrew@dunslane.net> writes:
Cache by-reference missing values in a long lived context
The v11 version of this patch is causing a compiler warning for me:

In file included from heaptuple.c:58:
heaptuple.c: In function 'missing_hash':
heaptuple.c:97:3: warning: implicit declaration of function 'hash_any'; did you mean 'hash_stats'? [-Wimplicit-function-declaration]   hash_any((const unsigned char *) entry->value, entry->len));   ^~~~~~~~
../../../../src/include/postgres.h:471:38: note: in definition of macro 'DatumGetUInt32' #define DatumGetUInt32(X) ((uint32) (X))                                      ^

It seems to work anyway, but please fix.



Sorry about that, fixed.

While we're about it, let's also fix these warnings which are seen on my systems building releases 11 and 12:

/home/andrew/bf/root/REL_11_STABLE/pgsql.build/../pgsql/src/backend/commands/foreigncmds.c:481:22: warning: ‘funcargtypes’ may be used uninitialized [-Wmaybe-uninitialized]
/home/andrew/bf/root/REL_12_STABLE/pgsql.build/../pgsql/src/backend/commands/foreigncmds.c:487:22: warning: ‘funcargtypes’ may be used uninitialized [-Wmaybe-uninitialized]

Maybe funcargtypes here should be initialized to  { 0 } ?


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: pgsql: Include header file inadvertently missed in commit 2d13dab048
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Cache by-reference missing values in a long lived context