On 1/3/24 10:25 AM, Cédric Villemain wrote:
Hi Palak,

I did a quick review of the patch:

+CREATE FUNCTION pg_buffercache_invalidate(IN int, IN bool default true)
+RETURNS bool
+AS 'MODULE_PATHNAME', 'pg_buffercache_invalidate'
+LANGUAGE C PARALLEL SAFE;

--> Not enforced anywhere, but you can also add a comment to the function, for end users...

The arguments should also have names...


+    force = PG_GETARG_BOOL(1);

I think you also need to test PG_ARGISNULL with force parameter.
Actually, that's true for the first argument as well. Or, just mark the function as STRICT.
-- 
Jim Nasby, Data Architect, Austin TX