diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-09-19 23:32:45 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-09-19 23:32:59 -0400 |
commit | 2d484f9b058035d41204f2eb8a0a8d2e8ee57b44 (patch) | |
tree | c742293df1ceab9025545dbac205a9a86428ac66 /src/backend/access/gist/gistproc.c | |
parent | d3a4f89d8a3e500bd7c0b7a8a8a5ce1b47859128 (diff) | |
download | postgresql-2d484f9b058035d41204f2eb8a0a8d2e8ee57b44.tar.gz |
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
Diffstat (limited to 'src/backend/access/gist/gistproc.c')
-rw-r--r-- | src/backend/access/gist/gistproc.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/src/backend/access/gist/gistproc.c b/src/backend/access/gist/gistproc.c index 08990f5a1b..d1919fc74b 100644 --- a/src/backend/access/gist/gistproc.c +++ b/src/backend/access/gist/gistproc.c @@ -185,37 +185,9 @@ gist_box_union(PG_FUNCTION_ARGS) } /* - * GiST Compress methods for boxes - * - * do not do anything. + * We store boxes as boxes in GiST indexes, so we do not need + * compress, decompress, or fetch functions. */ -Datum -gist_box_compress(PG_FUNCTION_ARGS) -{ - PG_RETURN_POINTER(PG_GETARG_POINTER(0)); -} - -/* - * GiST DeCompress method for boxes (also used for points, polygons - * and circles) - * - * do not do anything --- we just use the stored box as is. - */ -Datum -gist_box_decompress(PG_FUNCTION_ARGS) -{ - PG_RETURN_POINTER(PG_GETARG_POINTER(0)); -} - -/* - * GiST Fetch method for boxes - * do not do anything --- we just return the stored box as is. - */ -Datum -gist_box_fetch(PG_FUNCTION_ARGS) -{ - PG_RETURN_POINTER(PG_GETARG_POINTER(0)); -} /* * The GiST Penalty method for boxes (also used for points) |