From 2d484f9b058035d41204f2eb8a0a8d2e8ee57b44 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 19 Sep 2017 23:32:45 -0400 Subject: Remove no-op GiST support functions in the core GiST opclasses. The preceding patch allowed us to remove useless GiST support functions. This patch actually does that for all the no-op cases in the core GiST code. This buys us whatever performance gain is to be had, and more importantly exercises the preceding patch. There remain no-op functions in the contrib GiST opclasses, but those will take more work to remove. Discussion: https://postgr.es/m/CAJEAwVELVx9gYscpE=Be6iJxvdW5unZ_LkcAaVNSeOwvdwtD=A@mail.gmail.com --- src/backend/utils/adt/network_gist.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/backend/utils/adt/network_gist.c') diff --git a/src/backend/utils/adt/network_gist.c b/src/backend/utils/adt/network_gist.c index a0097dae9c5..0e36b7685de 100644 --- a/src/backend/utils/adt/network_gist.c +++ b/src/backend/utils/adt/network_gist.c @@ -576,17 +576,9 @@ inet_gist_compress(PG_FUNCTION_ARGS) } /* - * The GiST decompress function - * - * do not do anything --- we just use the stored GistInetKey as-is. + * We do not need a decompress function, because the other GiST inet + * support functions work with the GistInetKey representation. */ -Datum -inet_gist_decompress(PG_FUNCTION_ARGS) -{ - GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0); - - PG_RETURN_POINTER(entry); -} /* * The GiST fetch function -- cgit v1.2.3