Mark commented out code as unused
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 22 Jan 2026 11:41:52 +0000 (12:41 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 22 Jan 2026 11:44:07 +0000 (12:44 +0100)
There were many PG_GETARG_* calls, mostly around gin, gist, spgist
code, that were commented out, presumably to indicate that the
argument was unused and to indicate that it wasn't forgotten or
miscounted.  But keeping commented-out code updated with refactorings
and style changes is annoying.  So this commit changes them to

    #ifdef NOT_USED

blocks, which is a style already in use.  That way, at least the
indentation and syntax highlighting works correctly, making some of
these blocks much easier to read.

An alternative would be to just delete that code, but there is some
value in making unused arguments explicit, and some of this arguably
serves as example code for index AM APIs.

Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Reviewed-by: David Geier <geidav.pg@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/328e4371-9a4c-4196-9df9-1f23afc900df%40eisentraut.org

48 files changed:
contrib/btree_gist/btree_bit.c
contrib/btree_gist/btree_bool.c
contrib/btree_gist/btree_bytea.c
contrib/btree_gist/btree_cash.c
contrib/btree_gist/btree_date.c
contrib/btree_gist/btree_enum.c
contrib/btree_gist/btree_float4.c
contrib/btree_gist/btree_float8.c
contrib/btree_gist/btree_inet.c
contrib/btree_gist/btree_int2.c
contrib/btree_gist/btree_int4.c
contrib/btree_gist/btree_int8.c
contrib/btree_gist/btree_interval.c
contrib/btree_gist/btree_macaddr.c
contrib/btree_gist/btree_macaddr8.c
contrib/btree_gist/btree_numeric.c
contrib/btree_gist/btree_oid.c
contrib/btree_gist/btree_text.c
contrib/btree_gist/btree_time.c
contrib/btree_gist/btree_ts.c
contrib/btree_gist/btree_uuid.c
contrib/cube/cube.c
contrib/hstore/hstore_gin.c
contrib/hstore/hstore_gist.c
contrib/intarray/_int_gin.c
contrib/intarray/_int_gist.c
contrib/intarray/_intbig_gist.c
contrib/ltree/_ltree_gist.c
contrib/ltree/ltree_gist.c
contrib/pg_trgm/trgm_gin.c
contrib/pg_trgm/trgm_gist.c
contrib/seg/seg.c
doc/src/sgml/gist.sgml
src/backend/access/gin/ginarrayproc.c
src/backend/access/gist/gistproc.c
src/backend/access/spgist/spgkdtreeproc.c
src/backend/access/spgist/spgquadtreeproc.c
src/backend/access/spgist/spgtextproc.c
src/backend/utils/adt/datum.c
src/backend/utils/adt/jsonb_gin.c
src/backend/utils/adt/network_gist.c
src/backend/utils/adt/network_spgist.c
src/backend/utils/adt/rangetypes_spgist.c
src/backend/utils/adt/tsginidx.c
src/backend/utils/adt/tsgistidx.c
src/backend/utils/adt/tsquery_gist.c
src/backend/utils/adt/varlena.c
src/test/modules/spgist_name_ops/spgist_name_ops.c

index 9199f8860975d8320d6b819c4acbd4e03cecfac4..2b9c18a586f3718e6dc591ea576b474503a9be0d 100644 (file)
@@ -139,8 +139,9 @@ gbt_bit_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    void       *query = DatumGetByteaP(PG_GETARG_DATUM(1));
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    bool        retval;
    GBT_VARKEY *key = (GBT_VARKEY *) DatumGetPointer(entry->key);
index 344f059c78fdebcf0d5be84c8c84676e27c3eb16..8e59523f474b5ee12c2574af13ca8f6a6a2c2a40 100644 (file)
@@ -108,8 +108,9 @@ gbt_bool_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    bool        query = PG_GETARG_INT16(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    boolKEY    *kkk = (boolKEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
index 26f8710fad5c6f2da39fbe4b464ef8e25fdc6bbb..50bb24308e947e31a15355a312bd6efa4421f463 100644 (file)
@@ -101,8 +101,9 @@ gbt_bytea_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    void       *query = DatumGetByteaP(PG_GETARG_DATUM(1));
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    bool        retval;
    GBT_VARKEY *key = (GBT_VARKEY *) DatumGetPointer(entry->key);
index 282d5c5731fefa56e2dcc85c26645b98183a73ec..a347b1320e487f5442b0ca8a51ef08388f3deb50 100644 (file)
@@ -139,8 +139,9 @@ gbt_cash_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    Cash        query = PG_GETARG_CASH(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    cashKEY    *kkk = (cashKEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
@@ -161,8 +162,9 @@ gbt_cash_distance(PG_FUNCTION_ARGS)
 {
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    Cash        query = PG_GETARG_CASH(1);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    cashKEY    *kkk = (cashKEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
 
index 1f1a3f32b56a9391baba82d6b2f19de97881a996..5e41f4574c5ad38005bc8de6f197131b97f3590d 100644 (file)
@@ -154,8 +154,9 @@ gbt_date_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    DateADT     query = PG_GETARG_DATEADT(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    dateKEY    *kkk = (dateKEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
@@ -176,8 +177,9 @@ gbt_date_distance(PG_FUNCTION_ARGS)
 {
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    DateADT     query = PG_GETARG_DATEADT(1);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    dateKEY    *kkk = (dateKEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
 
index 8f1ffff46965fb621851423897f34c7e5408698d..0dd91002c956fad04ec5ce450a5b0f7e4661611e 100644 (file)
@@ -126,8 +126,9 @@ gbt_enum_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    Oid         query = PG_GETARG_OID(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    oidKEY     *kkk = (oidKEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
index d9c859835dacc68a758399ca8255088e4526e259..c076918fd48fc11514752114d715cac5c2feafdb 100644 (file)
@@ -133,8 +133,9 @@ gbt_float4_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    float4      query = PG_GETARG_FLOAT4(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    float4KEY  *kkk = (float4KEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
@@ -155,8 +156,9 @@ gbt_float4_distance(PG_FUNCTION_ARGS)
 {
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    float4      query = PG_GETARG_FLOAT4(1);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    float4KEY  *kkk = (float4KEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
 
index 567beede178ad665fc21d1201b3ed4cf796e1004..d7386e885a279a31554046eb296093c91589a189 100644 (file)
@@ -141,8 +141,9 @@ gbt_float8_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    float8      query = PG_GETARG_FLOAT8(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    float8KEY  *kkk = (float8KEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
@@ -163,8 +164,9 @@ gbt_float8_distance(PG_FUNCTION_ARGS)
 {
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    float8      query = PG_GETARG_FLOAT8(1);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    float8KEY  *kkk = (float8KEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
 
index e726375f61d06522b6148dff31c8bb76ed0b328e..9d04b92d3b8d9da936a2ce01f5ff5af51a002012 100644 (file)
@@ -120,8 +120,9 @@ gbt_inet_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    Datum       dquery = PG_GETARG_DATUM(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    inetKEY    *kkk = (inetKEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
index faf456997bbf12a4ad27918d25dae96025823690..cc4b33177e34396baa5becac5e290c9f2841b150 100644 (file)
@@ -139,8 +139,9 @@ gbt_int2_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    int16       query = PG_GETARG_INT16(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    int16KEY   *kkk = (int16KEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
@@ -160,8 +161,9 @@ gbt_int2_distance(PG_FUNCTION_ARGS)
 {
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    int16       query = PG_GETARG_INT16(1);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    int16KEY   *kkk = (int16KEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
 
index 0bdb9e58c56017acf9f61e1a4e709cc987f1035f..47790578e6bcd1ea1a3d4cad4a6a94490d178e89 100644 (file)
@@ -137,8 +137,9 @@ gbt_int4_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    int32       query = PG_GETARG_INT32(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    int32KEY   *kkk = (int32KEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
@@ -158,8 +159,9 @@ gbt_int4_distance(PG_FUNCTION_ARGS)
 {
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    int32       query = PG_GETARG_INT32(1);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    int32KEY   *kkk = (int32KEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
 
index a9a7b56927847bcbfb5d635cc2cd4f0790e0ba19..f48122c8d84b68ff42a131cfcc30fe83e022d840 100644 (file)
@@ -139,8 +139,9 @@ gbt_int8_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    int64       query = PG_GETARG_INT64(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    int64KEY   *kkk = (int64KEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
@@ -160,8 +161,9 @@ gbt_int8_distance(PG_FUNCTION_ARGS)
 {
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    int64       query = PG_GETARG_INT64(1);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    int64KEY   *kkk = (int64KEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
 
index 1fc27f60384ea4a29d8532660153ec301727e7b2..6b81fa2b39bdd3c946c1a800a921a87af343135c 100644 (file)
@@ -211,8 +211,9 @@ gbt_intv_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    Interval   *query = PG_GETARG_INTERVAL_P(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    intvKEY    *kkk = (intvKEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
@@ -233,8 +234,9 @@ gbt_intv_distance(PG_FUNCTION_ARGS)
 {
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    Interval   *query = PG_GETARG_INTERVAL_P(1);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    intvKEY    *kkk = (intvKEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
 
index c444a709853a7179d6b4bb029f0176b187e8de2e..df7c0040011a8825c1f29ad014b8a5682e1ba8ce 100644 (file)
@@ -126,8 +126,9 @@ gbt_macad_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    macaddr    *query = (macaddr *) PG_GETARG_POINTER(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    macKEY     *kkk = (macKEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
index 6d9837d90a3405fd04bcdcc406ee107cec64f29a..3b0c9b81e854ce70ebb5e43d8c1f832a24826322 100644 (file)
@@ -125,8 +125,9 @@ gbt_macad8_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    macaddr8   *query = (macaddr8 *) PG_GETARG_POINTER(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    mac8KEY    *kkk = (mac8KEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
index 7ca097abb74d5a21923fe6a1f3a60fe0878c6801..dba04c3a1b3bd1a03ba907a06215b1de5bf43c0d 100644 (file)
@@ -106,8 +106,9 @@ gbt_numeric_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    void       *query = DatumGetNumeric(PG_GETARG_DATUM(1));
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    bool        retval;
    GBT_VARKEY *key = (GBT_VARKEY *) DatumGetPointer(entry->key);
index b8f2f661076c68ba95bceb0dcc4a2f172ff798b2..3ddf2a993d416187fff93b782625caa6504e235b 100644 (file)
@@ -139,8 +139,9 @@ gbt_oid_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    Oid         query = PG_GETARG_OID(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    oidKEY     *kkk = (oidKEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
@@ -160,8 +161,9 @@ gbt_oid_distance(PG_FUNCTION_ARGS)
 {
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    Oid         query = PG_GETARG_OID(1);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    oidKEY     *kkk = (oidKEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
 
index ddee42504a19228a31947c845323388bddc62070..2ac12f1cab275d6416a04f8ec2ef5d0c25bbb99f 100644 (file)
@@ -193,8 +193,9 @@ gbt_text_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    void       *query = DatumGetTextP(PG_GETARG_DATUM(1));
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    bool        retval;
    GBT_VARKEY *key = (GBT_VARKEY *) DatumGetPointer(entry->key);
@@ -220,8 +221,9 @@ gbt_bpchar_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    void       *query = DatumGetTextP(PG_GETARG_DATUM(1));
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    bool        retval;
    GBT_VARKEY *key = (GBT_VARKEY *) DatumGetPointer(entry->key);
index e744f1be017fa130a1939a3a4d58b97d0ffcb28c..9d23fb4b867eb4d0594356744d7a5fd593c58fe5 100644 (file)
@@ -194,8 +194,9 @@ gbt_time_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    TimeADT     query = PG_GETARG_TIMEADT(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    timeKEY    *kkk = (timeKEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
@@ -215,8 +216,9 @@ gbt_time_distance(PG_FUNCTION_ARGS)
 {
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    TimeADT     query = PG_GETARG_TIMEADT(1);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    timeKEY    *kkk = (timeKEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
 
@@ -233,8 +235,9 @@ gbt_timetz_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    TimeTzADT  *query = PG_GETARG_TIMETZADT_P(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    timeKEY    *kkk = (timeKEY *) DatumGetPointer(entry->key);
    TimeADT     qqq;
index 3b163a729cbf4a2501ab72b77c3beebcae3bbd21..0f88d5d72f4b38d9189113f5226bac2e17ea434f 100644 (file)
@@ -244,8 +244,9 @@ gbt_ts_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    Timestamp   query = PG_GETARG_TIMESTAMP(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    tsKEY      *kkk = (tsKEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
@@ -265,8 +266,9 @@ gbt_ts_distance(PG_FUNCTION_ARGS)
 {
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    Timestamp   query = PG_GETARG_TIMESTAMP(1);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    tsKEY      *kkk = (tsKEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
 
@@ -283,8 +285,9 @@ gbt_tstz_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    TimestampTz query = PG_GETARG_TIMESTAMPTZ(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    char       *kkk = (char *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
@@ -306,8 +309,9 @@ gbt_tstz_distance(PG_FUNCTION_ARGS)
 {
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    TimestampTz query = PG_GETARG_TIMESTAMPTZ(1);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    char       *kkk = (char *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
    Timestamp   qqq;
index 1091af222d1d1320a682fa2a01185e1a34e358ea..c891840fb254185cec5aa64254afc56bc36406db 100644 (file)
@@ -136,8 +136,9 @@ gbt_uuid_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    pg_uuid_t  *query = PG_GETARG_UUID_P(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    uuidKEY    *kkk = (uuidKEY *) DatumGetPointer(entry->key);
    GBT_NUMKEY_R key;
index 3600457cbc098f181c4fbfcfb088965d9c4f004b..77263ab277f93eadeea94072e16a773050212823 100644 (file)
@@ -397,8 +397,9 @@ g_cube_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    NDBOX      *query = PG_GETARG_NDBOX_P(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    bool        res;
 
index 2e5fa115924ba8177397b461ab6bdb6cf9a5342a..1365539f95f727c4cf9161aab88364ab9613162a 100644 (file)
@@ -152,11 +152,13 @@ gin_consistent_hstore(PG_FUNCTION_ARGS)
 {
    bool       *check = (bool *) PG_GETARG_POINTER(0);
    StrategyNumber strategy = PG_GETARG_UINT16(1);
-
-   /* HStore      *query = PG_GETARG_HSTORE_P(2); */
+#ifdef NOT_USED
+   HStore     *query = PG_GETARG_HSTORE_P(2);
+#endif
    int32       nkeys = PG_GETARG_INT32(3);
-
-   /* Pointer     *extra_data = (Pointer *) PG_GETARG_POINTER(4); */
+#ifdef NOT_USED
+   Pointer    *extra_data = (Pointer *) PG_GETARG_POINTER(4);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(5);
    bool        res = true;
    int32       i;
index 36825ef867b4288163e0b7c2bf3b9831ef161ec3..832a268e0d2f0d9b3edbccd5064cd71096f92186 100644 (file)
@@ -510,8 +510,9 @@ ghstore_consistent(PG_FUNCTION_ARGS)
 {
    GISTTYPE   *entry = (GISTTYPE *) DatumGetPointer(((GISTENTRY *) PG_GETARG_POINTER(0))->key);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    int         siglen = GET_SIGLEN();
    bool        res = true;
index c60616c3f772c2787fb5574d013f288ac565425c..baa1cc902b36436f0ee5c91e1a052c0c3eeee11c 100644 (file)
@@ -112,8 +112,9 @@ ginint4_consistent(PG_FUNCTION_ARGS)
    bool       *check = (bool *) PG_GETARG_POINTER(0);
    StrategyNumber strategy = PG_GETARG_UINT16(1);
    int32       nkeys = PG_GETARG_INT32(3);
-
-   /* Pointer     *extra_data = (Pointer *) PG_GETARG_POINTER(4); */
+#ifdef NOT_USED
+   Pointer    *extra_data = (Pointer *) PG_GETARG_POINTER(4);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(5);
    bool        res = false;
    int32       i;
index 90cf11c01a50b9e6c3ba7a1fb13e526303295854..586e19df01b4def1e11ba1ad10eafe9054169505 100644 (file)
@@ -49,8 +49,9 @@ g_int_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    ArrayType  *query = PG_GETARG_ARRAYTYPE_P_COPY(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    bool        retval = false; /* silence compiler warning */
 
index 6d6ff7413f971966dfc78fa52a52ad2e8c1a8a03..6ffb03dab582637abc3b20910033ceaf13253767 100644 (file)
@@ -465,8 +465,9 @@ g_intbig_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    ArrayType  *query = PG_GETARG_ARRAYTYPE_P(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    int         siglen = GET_SIGLEN();
    bool        retval;
index 6383b37e53f72889f3deb99f031d278bd2abd290..07d6682359245f10bdd8e0fbc1adbce41891fcd1 100644 (file)
@@ -506,8 +506,9 @@ _ltree_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    void       *query = PG_DETOAST_DATUM(PG_GETARG_DATUM(1));
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    int         siglen = LTREE_GET_ASIGLEN();
    ltree_gist *key = (ltree_gist *) DatumGetPointer(entry->key);
index bb7f46347221ed32912b7bba3782b65e650ab004..78c9505299098ef40a71f4e9166227e055751e9d 100644 (file)
@@ -618,8 +618,9 @@ ltree_consistent(PG_FUNCTION_ARGS)
 {
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    int         siglen = LTREE_GET_SIGLEN();
    ltree_gist *key = (ltree_gist *) DatumGetPointer(entry->key);
index 66ff6adde9978dadf0dcbbe5a8366bca117c75f3..014bb3c848cd19a734d7f74917e9fee927a3db6a 100644 (file)
@@ -72,11 +72,13 @@ gin_extract_query_trgm(PG_FUNCTION_ARGS)
    text       *val = (text *) PG_GETARG_TEXT_PP(0);
    int32      *nentries = (int32 *) PG_GETARG_POINTER(1);
    StrategyNumber strategy = PG_GETARG_UINT16(2);
-
-   /* bool   **pmatch = (bool **) PG_GETARG_POINTER(3); */
+#ifdef NOT_USED
+   bool      **pmatch = (bool **) PG_GETARG_POINTER(3);
+#endif
    Pointer   **extra_data = (Pointer **) PG_GETARG_POINTER(4);
-
-   /* bool   **nullFlags = (bool **) PG_GETARG_POINTER(5); */
+#ifdef NOT_USED
+   bool      **nullFlags = (bool **) PG_GETARG_POINTER(5);
+#endif
    int32      *searchMode = (int32 *) PG_GETARG_POINTER(6);
    Datum      *entries = NULL;
    TRGM       *trg;
@@ -171,8 +173,9 @@ gin_trgm_consistent(PG_FUNCTION_ARGS)
 {
    bool       *check = (bool *) PG_GETARG_POINTER(0);
    StrategyNumber strategy = PG_GETARG_UINT16(1);
-
-   /* text    *query = PG_GETARG_TEXT_PP(2); */
+#ifdef NOT_USED
+   text       *query = PG_GETARG_TEXT_PP(2);
+#endif
    int32       nkeys = PG_GETARG_INT32(3);
    Pointer    *extra_data = (Pointer *) PG_GETARG_POINTER(4);
    bool       *recheck = (bool *) PG_GETARG_POINTER(5);
@@ -269,8 +272,9 @@ gin_trgm_triconsistent(PG_FUNCTION_ARGS)
 {
    GinTernaryValue *check = (GinTernaryValue *) PG_GETARG_POINTER(0);
    StrategyNumber strategy = PG_GETARG_UINT16(1);
-
-   /* text    *query = PG_GETARG_TEXT_PP(2); */
+#ifdef NOT_USED
+   text       *query = PG_GETARG_TEXT_PP(2);
+#endif
    int32       nkeys = PG_GETARG_INT32(3);
    Pointer    *extra_data = (Pointer *) PG_GETARG_POINTER(4);
    GinTernaryValue res = GIN_MAYBE;
index 5c7deb103a6368cbb6ac40fe60585ab5449d908b..2f0d61985a5238756aff8bf5b77c20ee3672ce82 100644 (file)
@@ -199,8 +199,9 @@ gtrgm_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    text       *query = PG_GETARG_TEXT_P(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    int         siglen = GET_SIGLEN();
    TRGM       *key = (TRGM *) DatumGetPointer(entry->key);
@@ -454,8 +455,9 @@ gtrgm_distance(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    text       *query = PG_GETARG_TEXT_P(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    int         siglen = GET_SIGLEN();
    TRGM       *key = (TRGM *) DatumGetPointer(entry->key);
index 2d3a048c73ecb06f6c6854caf9425ef03d3a8e03..972265b1bac22d7f37dec0a79654ba14dff55d4b 100644 (file)
@@ -202,8 +202,9 @@ gseg_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    Datum       query = PG_GETARG_DATUM(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
 
    /* All cases served by this function are exact */
index 1871f74272176e715e0fa8fee5ce0a8f3c103e38..5c0a0c48bab59b9e2c45812d02bfca2696d4b26e 100644 (file)
@@ -343,7 +343,9 @@ my_consistent(PG_FUNCTION_ARGS)
     GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
     data_type  *query = PG_GETARG_DATA_TYPE_P(1);
     StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-    /* Oid subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+    Oid         subtype = PG_GETARG_OID(3);
+#endif
     bool       *recheck = (bool *) PG_GETARG_POINTER(4);
     data_type  *key = DatumGetDataType(entry-&gt;key);
     bool        retval;
@@ -830,8 +832,10 @@ my_distance(PG_FUNCTION_ARGS)
     GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
     data_type  *query = PG_GETARG_DATA_TYPE_P(1);
     StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-    /* Oid subtype = PG_GETARG_OID(3); */
-    /* bool *recheck = (bool *) PG_GETARG_POINTER(4); */
+#ifdef NOT_USED
+    Oid         subtype = PG_GETARG_OID(3);
+    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
+#endif
     data_type  *key = DatumGetDataType(entry-&gt;key);
     double      retval;
 
index cb35d1f6b31cb5747810f259634259e76886fb2b..12f1731c5bd1c00b38829ea0856aef50bd86d1a7 100644 (file)
@@ -82,9 +82,10 @@ ginqueryarrayextract(PG_FUNCTION_ARGS)
    ArrayType  *array = PG_GETARG_ARRAYTYPE_P_COPY(0);
    int32      *nkeys = (int32 *) PG_GETARG_POINTER(1);
    StrategyNumber strategy = PG_GETARG_UINT16(2);
-
-   /* bool   **pmatch = (bool **) PG_GETARG_POINTER(3); */
-   /* Pointer     *extra_data = (Pointer *) PG_GETARG_POINTER(4); */
+#ifdef NOT_USED
+   bool      **pmatch = (bool **) PG_GETARG_POINTER(3);
+   Pointer    *extra_data = (Pointer *) PG_GETARG_POINTER(4);
+#endif
    bool      **nullFlags = (bool **) PG_GETARG_POINTER(5);
    int32      *searchMode = (int32 *) PG_GETARG_POINTER(6);
    int16       elmlen;
@@ -143,14 +144,17 @@ ginarrayconsistent(PG_FUNCTION_ARGS)
 {
    bool       *check = (bool *) PG_GETARG_POINTER(0);
    StrategyNumber strategy = PG_GETARG_UINT16(1);
-
-   /* ArrayType  *query = PG_GETARG_ARRAYTYPE_P(2); */
+#ifdef NOT_USED
+   ArrayType  *query = PG_GETARG_ARRAYTYPE_P(2);
+#endif
    int32       nkeys = PG_GETARG_INT32(3);
-
-   /* Pointer     *extra_data = (Pointer *) PG_GETARG_POINTER(4); */
+#ifdef NOT_USED
+   Pointer    *extra_data = (Pointer *) PG_GETARG_POINTER(4);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(5);
-
-   /* Datum       *queryKeys = (Datum *) PG_GETARG_POINTER(6); */
+#ifdef NOT_USED
+   Datum      *queryKeys = (Datum *) PG_GETARG_POINTER(6);
+#endif
    bool       *nullFlags = (bool *) PG_GETARG_POINTER(7);
    bool        res;
    int32       i;
@@ -227,12 +231,14 @@ ginarraytriconsistent(PG_FUNCTION_ARGS)
 {
    GinTernaryValue *check = (GinTernaryValue *) PG_GETARG_POINTER(0);
    StrategyNumber strategy = PG_GETARG_UINT16(1);
-
-   /* ArrayType  *query = PG_GETARG_ARRAYTYPE_P(2); */
+#ifdef NOT_USED
+   ArrayType  *query = PG_GETARG_ARRAYTYPE_P(2);
+#endif
    int32       nkeys = PG_GETARG_INT32(3);
-
-   /* Pointer     *extra_data = (Pointer *) PG_GETARG_POINTER(4); */
-   /* Datum       *queryKeys = (Datum *) PG_GETARG_POINTER(5); */
+#ifdef NOT_USED
+   Pointer    *extra_data = (Pointer *) PG_GETARG_POINTER(4);
+   Datum      *queryKeys = (Datum *) PG_GETARG_POINTER(5);
+#endif
    bool       *nullFlags = (bool *) PG_GETARG_POINTER(6);
    GinTernaryValue res;
    int32       i;
index c66e35079a133fe3793371fe42f076b891da4fa7..bb84030b23d0077cfd953b7fd99c1a74c8ef6aed 100644 (file)
@@ -115,8 +115,9 @@ gist_box_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    BOX        *query = PG_GETARG_BOX_P(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
 
    /* All cases served by this function are exact */
@@ -1064,8 +1065,9 @@ gist_poly_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    POLYGON    *query = PG_GETARG_POLYGON_P(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    bool        result;
 
@@ -1132,8 +1134,9 @@ gist_circle_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    CIRCLE     *query = PG_GETARG_CIRCLE_P(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    BOX         bbox;
    bool        result;
@@ -1502,9 +1505,10 @@ gist_box_distance(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    Datum       query = PG_GETARG_DATUM(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid subtype = PG_GETARG_OID(3); */
-   /* bool    *recheck = (bool *) PG_GETARG_POINTER(4); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+   bool       *recheck = (bool *) PG_GETARG_POINTER(4);
+#endif
    float8      distance;
 
    distance = gist_bbox_distance(entry, query, strategy);
@@ -1528,8 +1532,9 @@ gist_circle_distance(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    Datum       query = PG_GETARG_DATUM(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    float8      distance;
 
@@ -1545,8 +1550,9 @@ gist_poly_distance(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    Datum       query = PG_GETARG_DATUM(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    float8      distance;
 
index 1ec0a4f59f32bd6e8ce9d46b9949161a8e10d888..83fca0e7cb96bac309275629dd8ab7aacd156acf 100644 (file)
@@ -27,7 +27,9 @@
 Datum
 spg_kd_config(PG_FUNCTION_ARGS)
 {
-   /* spgConfigIn *cfgin = (spgConfigIn *) PG_GETARG_POINTER(0); */
+#ifdef NOT_USED
+   spgConfigIn *cfgin = (spgConfigIn *) PG_GETARG_POINTER(0);
+#endif
    spgConfigOut *cfg = (spgConfigOut *) PG_GETARG_POINTER(1);
 
    cfg->prefixType = FLOAT8OID;
index 1b907d9186bb311a2c05e473370d5f91f451199d..39e7749fe1635939c83bee7cc38d80b60bea8718 100644 (file)
@@ -26,7 +26,9 @@
 Datum
 spg_quad_config(PG_FUNCTION_ARGS)
 {
-   /* spgConfigIn *cfgin = (spgConfigIn *) PG_GETARG_POINTER(0); */
+#ifdef NOT_USED
+   spgConfigIn *cfgin = (spgConfigIn *) PG_GETARG_POINTER(0);
+#endif
    spgConfigOut *cfg = (spgConfigOut *) PG_GETARG_POINTER(1);
 
    cfg->prefixType = POINTOID;
index 2191f57b17be362a5d68d8d166d012f5f1a55d8d..e00feff0bb36d490c28a58461e740cfe4ed42839 100644 (file)
@@ -95,7 +95,9 @@ typedef struct spgNodePtr
 Datum
 spg_text_config(PG_FUNCTION_ARGS)
 {
-   /* spgConfigIn *cfgin = (spgConfigIn *) PG_GETARG_POINTER(0); */
+#ifdef NOT_USED
+   spgConfigIn *cfgin = (spgConfigIn *) PG_GETARG_POINTER(0);
+#endif
    spgConfigOut *cfg = (spgConfigOut *) PG_GETARG_POINTER(1);
 
    cfg->prefixType = TEXTOID;
index e2472cd144432480a9f27b8c3df1853a1569114e..cc26bd67a5319232429d2bfd395b0c86f9576575 100644 (file)
@@ -396,7 +396,9 @@ datum_image_hash(Datum value, bool typByVal, int typLen)
 Datum
 btequalimage(PG_FUNCTION_ARGS)
 {
-   /* Oid      opcintype = PG_GETARG_OID(0); */
+#ifdef NOT_USED
+   Oid         opcintype = PG_GETARG_OID(0);
+#endif
 
    PG_RETURN_BOOL(true);
 }
index 715a9ad0a95890a5063dabd1ad860fc42b4ed738..d72a6441c5e9691afdabcdfba582a0a42a3ce89b 100644 (file)
@@ -931,8 +931,9 @@ gin_consistent_jsonb(PG_FUNCTION_ARGS)
 {
    bool       *check = (bool *) PG_GETARG_POINTER(0);
    StrategyNumber strategy = PG_GETARG_UINT16(1);
-
-   /* Jsonb       *query = PG_GETARG_JSONB_P(2); */
+#ifdef NOT_USED
+   Jsonb      *query = PG_GETARG_JSONB_P(2);
+#endif
    int32       nkeys = PG_GETARG_INT32(3);
 
    Pointer    *extra_data = (Pointer *) PG_GETARG_POINTER(4);
@@ -1014,8 +1015,9 @@ gin_triconsistent_jsonb(PG_FUNCTION_ARGS)
 {
    GinTernaryValue *check = (GinTernaryValue *) PG_GETARG_POINTER(0);
    StrategyNumber strategy = PG_GETARG_UINT16(1);
-
-   /* Jsonb       *query = PG_GETARG_JSONB_P(2); */
+#ifdef NOT_USED
+   Jsonb      *query = PG_GETARG_JSONB_P(2);
+#endif
    int32       nkeys = PG_GETARG_INT32(3);
    Pointer    *extra_data = (Pointer *) PG_GETARG_POINTER(4);
    GinTernaryValue res = GIN_MAYBE;
@@ -1220,8 +1222,9 @@ gin_consistent_jsonb_path(PG_FUNCTION_ARGS)
 {
    bool       *check = (bool *) PG_GETARG_POINTER(0);
    StrategyNumber strategy = PG_GETARG_UINT16(1);
-
-   /* Jsonb       *query = PG_GETARG_JSONB_P(2); */
+#ifdef NOT_USED
+   Jsonb      *query = PG_GETARG_JSONB_P(2);
+#endif
    int32       nkeys = PG_GETARG_INT32(3);
    Pointer    *extra_data = (Pointer *) PG_GETARG_POINTER(4);
    bool       *recheck = (bool *) PG_GETARG_POINTER(5);
@@ -1271,8 +1274,9 @@ gin_triconsistent_jsonb_path(PG_FUNCTION_ARGS)
 {
    GinTernaryValue *check = (GinTernaryValue *) PG_GETARG_POINTER(0);
    StrategyNumber strategy = PG_GETARG_UINT16(1);
-
-   /* Jsonb       *query = PG_GETARG_JSONB_P(2); */
+#ifdef NOT_USED
+   Jsonb      *query = PG_GETARG_JSONB_P(2);
+#endif
    int32       nkeys = PG_GETARG_INT32(3);
    Pointer    *extra_data = (Pointer *) PG_GETARG_POINTER(4);
    GinTernaryValue res = GIN_MAYBE;
index 2eec20b75e9ecbcd3ddf5df9d03fc42f9820ae59..2eeb3dea12031bf98e4ed34478a9bb561afe73b9 100644 (file)
@@ -117,8 +117,9 @@ inet_gist_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *ent = (GISTENTRY *) PG_GETARG_POINTER(0);
    inet       *query = PG_GETARG_INET_PP(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    GistInetKey *key = DatumGetInetKeyP(ent->key);
    int         minbits,
index 47e16d787316de56e79fa96e20eb969cd2410a03..52e3c666d4f49fe9b43ae5de49de3ede094fce2a 100644 (file)
@@ -50,7 +50,9 @@ static int    inet_spg_consistent_bitmap(const inet *prefix, int nkeys,
 Datum
 inet_spg_config(PG_FUNCTION_ARGS)
 {
-   /* spgConfigIn *cfgin = (spgConfigIn *) PG_GETARG_POINTER(0); */
+#ifdef NOT_USED
+   spgConfigIn *cfgin = (spgConfigIn *) PG_GETARG_POINTER(0);
+#endif
    spgConfigOut *cfg = (spgConfigOut *) PG_GETARG_POINTER(1);
 
    cfg->prefixType = CIDROID;
index b25b468b83dd27e0256d60f6dda329a74f5c7ea1..b198375e64d60add48d578cea5f62188aaf0df4b 100644 (file)
@@ -59,7 +59,9 @@ static int    adjacent_cmp_bounds(TypeCacheEntry *typcache, const RangeBound *arg,
 Datum
 spg_range_quad_config(PG_FUNCTION_ARGS)
 {
-   /* spgConfigIn *cfgin = (spgConfigIn *) PG_GETARG_POINTER(0); */
+#ifdef NOT_USED
+   spgConfigIn *cfgin = (spgConfigIn *) PG_GETARG_POINTER(0);
+#endif
    spgConfigOut *cfg = (spgConfigOut *) PG_GETARG_POINTER(1);
 
    cfg->prefixType = ANYRANGEOID;
index 3e4c964e8ea5935960f46c2a64dc0df68ce76ea8..725e6e5da48637255fc2a9d0ce905fe5614590e5 100644 (file)
@@ -95,12 +95,14 @@ gin_extract_tsquery(PG_FUNCTION_ARGS)
 {
    TSQuery     query = PG_GETARG_TSQUERY(0);
    int32      *nentries = (int32 *) PG_GETARG_POINTER(1);
-
-   /* StrategyNumber strategy = PG_GETARG_UINT16(2); */
+#ifdef NOT_USED
+   StrategyNumber strategy = PG_GETARG_UINT16(2);
+#endif
    bool      **ptr_partialmatch = (bool **) PG_GETARG_POINTER(3);
    Pointer   **extra_data = (Pointer **) PG_GETARG_POINTER(4);
-
-   /* bool   **nullFlags = (bool **) PG_GETARG_POINTER(5); */
+#ifdef NOT_USED
+   bool      **nullFlags = (bool **) PG_GETARG_POINTER(5);
+#endif
    int32      *searchMode = (int32 *) PG_GETARG_POINTER(6);
    Datum      *entries = NULL;
 
@@ -214,11 +216,13 @@ Datum
 gin_tsquery_consistent(PG_FUNCTION_ARGS)
 {
    bool       *check = (bool *) PG_GETARG_POINTER(0);
-
-   /* StrategyNumber strategy = PG_GETARG_UINT16(1); */
+#ifdef NOT_USED
+   StrategyNumber strategy = PG_GETARG_UINT16(1);
+#endif
    TSQuery     query = PG_GETARG_TSQUERY(2);
-
-   /* int32    nkeys = PG_GETARG_INT32(3); */
+#ifdef NOT_USED
+   int32       nkeys = PG_GETARG_INT32(3);
+#endif
    Pointer    *extra_data = (Pointer *) PG_GETARG_POINTER(4);
    bool       *recheck = (bool *) PG_GETARG_POINTER(5);
    bool        res = false;
@@ -263,11 +267,13 @@ Datum
 gin_tsquery_triconsistent(PG_FUNCTION_ARGS)
 {
    GinTernaryValue *check = (GinTernaryValue *) PG_GETARG_POINTER(0);
-
-   /* StrategyNumber strategy = PG_GETARG_UINT16(1); */
+#ifdef NOT_USED
+   StrategyNumber strategy = PG_GETARG_UINT16(1);
+#endif
    TSQuery     query = PG_GETARG_TSQUERY(2);
-
-   /* int32    nkeys = PG_GETARG_INT32(3); */
+#ifdef NOT_USED
+   int32       nkeys = PG_GETARG_INT32(3);
+#endif
    Pointer    *extra_data = (Pointer *) PG_GETARG_POINTER(4);
    GinTernaryValue res = GIN_FALSE;
 
index f90b93fb9e5f8ae79c3d824a1a2efb2b9708d06a..e35a25797a01a6f5af8fdf4ff0e9d88a66c436f3 100644 (file)
@@ -326,9 +326,10 @@ gtsvector_consistent(PG_FUNCTION_ARGS)
 {
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    TSQuery     query = PG_GETARG_TSQUERY(1);
-
-   /* StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2); */
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    SignTSVector *key = (SignTSVector *) DatumGetPointer(entry->key);
 
index b54c4910394bd1a8d9da42c417203c7674b55c51..3108442a54ade818a803a92c295bf4d64119d116 100644 (file)
@@ -55,8 +55,9 @@ gtsquery_consistent(PG_FUNCTION_ARGS)
    GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
    TSQuery     query = PG_GETARG_TSQUERY(1);
    StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-   /* Oid      subtype = PG_GETARG_OID(3); */
+#ifdef NOT_USED
+   Oid         subtype = PG_GETARG_OID(3);
+#endif
    bool       *recheck = (bool *) PG_GETARG_POINTER(4);
    TSQuerySign key = DatumGetTSQuerySign(entry->key);
    TSQuerySign sq = makeTSQuerySign(query);
index c80191f0a224eb71f135d78f5f77cf2122761f7c..6c1ebb0866db7fe1a38f0a2d1c649e0fe6aa6635 100644 (file)
@@ -2267,7 +2267,9 @@ varstr_abbrev_abort(int memtupcount, SortSupport ssup)
 Datum
 btvarstrequalimage(PG_FUNCTION_ARGS)
 {
-   /* Oid      opcintype = PG_GETARG_OID(0); */
+#ifdef NOT_USED
+   Oid         opcintype = PG_GETARG_OID(0);
+#endif
    Oid         collid = PG_GET_COLLATION();
    pg_locale_t locale;
 
index 1634053f85ca705d3444a15054b4790662f1449f..0c269740839d411bafeda9cdf1c31a805ac8d493 100644 (file)
@@ -33,7 +33,9 @@ PG_FUNCTION_INFO_V1(spgist_name_config);
 Datum
 spgist_name_config(PG_FUNCTION_ARGS)
 {
-   /* spgConfigIn *cfgin = (spgConfigIn *) PG_GETARG_POINTER(0); */
+#ifdef NOT_USED
+   spgConfigIn *cfgin = (spgConfigIn *) PG_GETARG_POINTER(0);
+#endif
    spgConfigOut *cfg = (spgConfigOut *) PG_GETARG_POINTER(1);
 
    cfg->prefixType = TEXTOID;