Fix boilerplate comments in btree_gist
authorHeikki Linnakangas <[email protected]>
Thu, 3 Apr 2025 10:39:33 +0000 (13:39 +0300)
committerHeikki Linnakangas <[email protected]>
Thu, 3 Apr 2025 10:39:33 +0000 (13:39 +0300)
A few of these were copy-pasted wrong, like the comment "Bytea ops" in
btree_numeric.c. Instead of fixing the incorrect ones, replace them
all with generic comment "GiST support functions".

Also tidy up the inconsistent newlines between various functions while
we're at it.

21 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

index f346b956fa9218fbc99bd86f27ff37c03fc1fa7d..7c71daae6d7fad4f172ae4f642aa857fedcc7ced 100644 (file)
@@ -8,10 +8,7 @@
 #include "utils/fmgrprotos.h"
 #include "utils/varbit.h"
 
-
-/*
-** Bit ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_bit_compress);
 PG_FUNCTION_INFO_V1(gbt_bit_union);
 PG_FUNCTION_INFO_V1(gbt_bit_picksplit);
@@ -121,7 +118,7 @@ static const gbtree_vinfo tinfo =
 
 
 /**************************************************
- * Bit ops
+ * GiST support functions
  **************************************************/
 
 Datum
@@ -161,8 +158,6 @@ gbt_bit_consistent(PG_FUNCTION_ARGS)
    PG_RETURN_BOOL(retval);
 }
 
-
-
 Datum
 gbt_bit_union(PG_FUNCTION_ARGS)
 {
@@ -173,7 +168,6 @@ gbt_bit_union(PG_FUNCTION_ARGS)
                                    &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_bit_picksplit(PG_FUNCTION_ARGS)
 {
@@ -196,7 +190,6 @@ gbt_bit_same(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(result);
 }
 
-
 Datum
 gbt_bit_penalty(PG_FUNCTION_ARGS)
 {
index adb724e16ac619580984b0ef5fe6b2e7946e2933..d2145d0d0c300b4b1e92234d102c8af3ef410a0e 100644 (file)
@@ -12,9 +12,7 @@ typedef struct boolkey
    bool        upper;
 } boolKEY;
 
-/*
-** bool ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_bool_compress);
 PG_FUNCTION_INFO_V1(gbt_bool_fetch);
 PG_FUNCTION_INFO_V1(gbt_bool_union);
@@ -82,10 +80,9 @@ static const gbtree_ninfo tinfo =
 
 
 /**************************************************
- * bool ops
+ * GiST support functions
  **************************************************/
 
-
 Datum
 gbt_bool_compress(PG_FUNCTION_ARGS)
 {
@@ -124,7 +121,6 @@ gbt_bool_consistent(PG_FUNCTION_ARGS)
                                      GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_bool_union(PG_FUNCTION_ARGS)
 {
@@ -135,7 +131,6 @@ gbt_bool_union(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_bool_penalty(PG_FUNCTION_ARGS)
 {
index 5eacb8c59a05e905bcd58bc4b4dda0c0a0b4c8a0..751b7a2ba4f017793780cb649af6682367a7f9cc 100644 (file)
@@ -7,10 +7,7 @@
 #include "btree_utils_var.h"
 #include "utils/fmgrprotos.h"
 
-
-/*
-** Bytea ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_bytea_compress);
 PG_FUNCTION_INFO_V1(gbt_bytea_union);
 PG_FUNCTION_INFO_V1(gbt_bytea_picksplit);
@@ -69,7 +66,6 @@ gbt_byteacmp(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
                                             PointerGetDatum(b)));
 }
 
-
 static const gbtree_vinfo tinfo =
 {
    gbt_t_bytea,
@@ -86,10 +82,9 @@ static const gbtree_vinfo tinfo =
 
 
 /**************************************************
- * Text ops
+ * GiST support functions
  **************************************************/
 
-
 Datum
 gbt_bytea_compress(PG_FUNCTION_ARGS)
 {
@@ -98,8 +93,6 @@ gbt_bytea_compress(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(gbt_var_compress(entry, &tinfo));
 }
 
-
-
 Datum
 gbt_bytea_consistent(PG_FUNCTION_ARGS)
 {
@@ -121,8 +114,6 @@ gbt_bytea_consistent(PG_FUNCTION_ARGS)
    PG_RETURN_BOOL(retval);
 }
 
-
-
 Datum
 gbt_bytea_union(PG_FUNCTION_ARGS)
 {
@@ -133,7 +124,6 @@ gbt_bytea_union(PG_FUNCTION_ARGS)
                                    &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_bytea_picksplit(PG_FUNCTION_ARGS)
 {
@@ -156,7 +146,6 @@ gbt_bytea_same(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(result);
 }
 
-
 Datum
 gbt_bytea_penalty(PG_FUNCTION_ARGS)
 {
index c18c34c8b83b2adbcaed1f72c96e43d72864c1a9..51bdacab8eba8319138bc672974fccca1ae7b1ba 100644 (file)
@@ -14,9 +14,7 @@ typedef struct
    Cash        upper;
 } cashKEY;
 
-/*
-** Cash ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_cash_compress);
 PG_FUNCTION_INFO_V1(gbt_cash_fetch);
 PG_FUNCTION_INFO_V1(gbt_cash_union);
@@ -111,11 +109,11 @@ cash_dist(PG_FUNCTION_ARGS)
    PG_RETURN_CASH(ra);
 }
 
+
 /**************************************************
- * Cash ops
+ * GiST support functions
  **************************************************/
 
-
 Datum
 gbt_cash_compress(PG_FUNCTION_ARGS)
 {
@@ -155,7 +153,6 @@ gbt_cash_consistent(PG_FUNCTION_ARGS)
                                      fcinfo->flinfo));
 }
 
-
 Datum
 gbt_cash_distance(PG_FUNCTION_ARGS)
 {
@@ -173,7 +170,6 @@ gbt_cash_distance(PG_FUNCTION_ARGS)
                                      &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_cash_union(PG_FUNCTION_ARGS)
 {
@@ -184,7 +180,6 @@ gbt_cash_union(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_cash_penalty(PG_FUNCTION_ARGS)
 {
index 7a4a9d7a8539ede35547a7a06122ba2e721ba2a0..e87f8c03fc7bdd5c30721371e8a6a55e6e565b7c 100644 (file)
@@ -14,9 +14,7 @@ typedef struct
    DateADT     upper;
 } dateKEY;
 
-/*
-** date ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_date_compress);
 PG_FUNCTION_INFO_V1(gbt_date_fetch);
 PG_FUNCTION_INFO_V1(gbt_date_union);
@@ -128,11 +126,9 @@ date_dist(PG_FUNCTION_ARGS)
 
 
 /**************************************************
- * date ops
+ * GiST support functions
  **************************************************/
 
-
-
 Datum
 gbt_date_compress(PG_FUNCTION_ARGS)
 {
@@ -172,7 +168,6 @@ gbt_date_consistent(PG_FUNCTION_ARGS)
                                      fcinfo->flinfo));
 }
 
-
 Datum
 gbt_date_distance(PG_FUNCTION_ARGS)
 {
@@ -190,7 +185,6 @@ gbt_date_distance(PG_FUNCTION_ARGS)
                                      &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_date_union(PG_FUNCTION_ARGS)
 {
@@ -201,7 +195,6 @@ gbt_date_union(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_date_penalty(PG_FUNCTION_ARGS)
 {
@@ -238,7 +231,6 @@ gbt_date_penalty(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(result);
 }
 
-
 Datum
 gbt_date_picksplit(PG_FUNCTION_ARGS)
 {
index 05d02e704a0d58efa02be2c8cd41417d4ff938e2..642a19e6d4697ac8488c3918ea9af787590f7d39 100644 (file)
@@ -16,9 +16,7 @@ typedef struct
    Oid         upper;
 } oidKEY;
 
-/*
-** enum ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_enum_compress);
 PG_FUNCTION_INFO_V1(gbt_enum_fetch);
 PG_FUNCTION_INFO_V1(gbt_enum_union);
@@ -99,10 +97,9 @@ static const gbtree_ninfo tinfo =
 
 
 /**************************************************
- * Enum ops
+ * GiST support functions
  **************************************************/
 
-
 Datum
 gbt_enum_compress(PG_FUNCTION_ARGS)
 {
@@ -152,7 +149,6 @@ gbt_enum_union(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_enum_penalty(PG_FUNCTION_ARGS)
 {
index d138aa94bf2de30c3dc0160b8cf9992c438679ca..673c14a8f72815447249369254024bf28043befe 100644 (file)
@@ -13,9 +13,7 @@ typedef struct float4key
    float4      upper;
 } float4KEY;
 
-/*
-** float4 ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_float4_compress);
 PG_FUNCTION_INFO_V1(gbt_float4_fetch);
 PG_FUNCTION_INFO_V1(gbt_float4_union);
@@ -107,10 +105,9 @@ float4_dist(PG_FUNCTION_ARGS)
 
 
 /**************************************************
- * float4 ops
+ * GiST support functions
  **************************************************/
 
-
 Datum
 gbt_float4_compress(PG_FUNCTION_ARGS)
 {
@@ -150,7 +147,6 @@ gbt_float4_consistent(PG_FUNCTION_ARGS)
                                      fcinfo->flinfo));
 }
 
-
 Datum
 gbt_float4_distance(PG_FUNCTION_ARGS)
 {
@@ -168,7 +164,6 @@ gbt_float4_distance(PG_FUNCTION_ARGS)
                                      &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_float4_union(PG_FUNCTION_ARGS)
 {
@@ -179,7 +174,6 @@ gbt_float4_union(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_float4_penalty(PG_FUNCTION_ARGS)
 {
index a74cd200529fa799fffa899ec430624668ca1741..9fb9cf024bd25fd8e066e5bdbd642eadebe41f3a 100644 (file)
@@ -13,9 +13,7 @@ typedef struct float8key
    float8      upper;
 } float8KEY;
 
-/*
-** float8 ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_float8_compress);
 PG_FUNCTION_INFO_V1(gbt_float8_fetch);
 PG_FUNCTION_INFO_V1(gbt_float8_union);
@@ -113,11 +111,11 @@ float8_dist(PG_FUNCTION_ARGS)
    PG_RETURN_FLOAT8(fabs(r));
 }
 
+
 /**************************************************
- * float8 ops
+ * GiST support functions
  **************************************************/
 
-
 Datum
 gbt_float8_compress(PG_FUNCTION_ARGS)
 {
@@ -157,7 +155,6 @@ gbt_float8_consistent(PG_FUNCTION_ARGS)
                                      fcinfo->flinfo));
 }
 
-
 Datum
 gbt_float8_distance(PG_FUNCTION_ARGS)
 {
@@ -175,7 +172,6 @@ gbt_float8_distance(PG_FUNCTION_ARGS)
                                      &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_float8_union(PG_FUNCTION_ARGS)
 {
@@ -186,7 +182,6 @@ gbt_float8_union(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_float8_penalty(PG_FUNCTION_ARGS)
 {
index 4cffd349091795e96f2a790847699e3dd50024f8..277fc3412d5548c03ee911d5ad159224354039ad 100644 (file)
@@ -14,9 +14,7 @@ typedef struct inetkey
    double      upper;
 } inetKEY;
 
-/*
-** inet ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_inet_compress);
 PG_FUNCTION_INFO_V1(gbt_inet_union);
 PG_FUNCTION_INFO_V1(gbt_inet_picksplit);
@@ -85,10 +83,9 @@ static const gbtree_ninfo tinfo =
 
 
 /**************************************************
- * inet ops
+ * GiST support functions
  **************************************************/
 
-
 Datum
 gbt_inet_compress(PG_FUNCTION_ARGS)
 {
@@ -114,7 +111,6 @@ gbt_inet_compress(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(retval);
 }
 
-
 Datum
 gbt_inet_consistent(PG_FUNCTION_ARGS)
 {
@@ -142,7 +138,6 @@ gbt_inet_consistent(PG_FUNCTION_ARGS)
                                      &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_inet_union(PG_FUNCTION_ARGS)
 {
@@ -153,7 +148,6 @@ gbt_inet_union(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_inet_penalty(PG_FUNCTION_ARGS)
 {
index 1751a6c055d890dba6b28da80360fe77e9c687fc..2859fa830b3be8034aa25a129a500f198d9208fe 100644 (file)
@@ -13,9 +13,7 @@ typedef struct int16key
    int16       upper;
 } int16KEY;
 
-/*
-** int16 ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_int2_compress);
 PG_FUNCTION_INFO_V1(gbt_int2_fetch);
 PG_FUNCTION_INFO_V1(gbt_int2_union);
@@ -25,6 +23,7 @@ PG_FUNCTION_INFO_V1(gbt_int2_distance);
 PG_FUNCTION_INFO_V1(gbt_int2_penalty);
 PG_FUNCTION_INFO_V1(gbt_int2_same);
 
+
 static bool
 gbt_int2gt(const void *a, const void *b, FmgrInfo *flinfo)
 {
@@ -112,10 +111,9 @@ int2_dist(PG_FUNCTION_ARGS)
 
 
 /**************************************************
- * int16 ops
+ * GiST support functions
  **************************************************/
 
-
 Datum
 gbt_int2_compress(PG_FUNCTION_ARGS)
 {
@@ -154,7 +152,6 @@ gbt_int2_consistent(PG_FUNCTION_ARGS)
                                      GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_int2_distance(PG_FUNCTION_ARGS)
 {
@@ -172,7 +169,6 @@ gbt_int2_distance(PG_FUNCTION_ARGS)
                                      &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_int2_union(PG_FUNCTION_ARGS)
 {
@@ -183,7 +179,6 @@ gbt_int2_union(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_int2_penalty(PG_FUNCTION_ARGS)
 {
index 90d183be6e82bc9eadb7c1c7eef6250b6f4fc230..9abda7ef00923dd69af45ce0375cbc4a102f0f21 100644 (file)
@@ -13,9 +13,7 @@ typedef struct int32key
    int32       upper;
 } int32KEY;
 
-/*
-** int32 ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_int4_compress);
 PG_FUNCTION_INFO_V1(gbt_int4_fetch);
 PG_FUNCTION_INFO_V1(gbt_int4_union);
@@ -25,7 +23,6 @@ PG_FUNCTION_INFO_V1(gbt_int4_distance);
 PG_FUNCTION_INFO_V1(gbt_int4_penalty);
 PG_FUNCTION_INFO_V1(gbt_int4_same);
 
-
 static bool
 gbt_int4gt(const void *a, const void *b, FmgrInfo *flinfo)
 {
@@ -113,10 +110,9 @@ int4_dist(PG_FUNCTION_ARGS)
 
 
 /**************************************************
- * int32 ops
+ * GiST support functions
  **************************************************/
 
-
 Datum
 gbt_int4_compress(PG_FUNCTION_ARGS)
 {
@@ -155,7 +151,6 @@ gbt_int4_consistent(PG_FUNCTION_ARGS)
                                      GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_int4_distance(PG_FUNCTION_ARGS)
 {
@@ -173,7 +168,6 @@ gbt_int4_distance(PG_FUNCTION_ARGS)
                                      &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_int4_union(PG_FUNCTION_ARGS)
 {
@@ -184,7 +178,6 @@ gbt_int4_union(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_int4_penalty(PG_FUNCTION_ARGS)
 {
index 661cf8189fc546194e4d2b02b6a091155610affb..6e7af9a1833e59954d4141ec18552b1db23259e8 100644 (file)
@@ -13,9 +13,7 @@ typedef struct int64key
    int64       upper;
 } int64KEY;
 
-/*
-** int64 ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_int8_compress);
 PG_FUNCTION_INFO_V1(gbt_int8_fetch);
 PG_FUNCTION_INFO_V1(gbt_int8_union);
@@ -113,10 +111,9 @@ int8_dist(PG_FUNCTION_ARGS)
 
 
 /**************************************************
- * int64 ops
+ * GiST support functions
  **************************************************/
 
-
 Datum
 gbt_int8_compress(PG_FUNCTION_ARGS)
 {
@@ -155,7 +152,6 @@ gbt_int8_consistent(PG_FUNCTION_ARGS)
                                      GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_int8_distance(PG_FUNCTION_ARGS)
 {
@@ -173,7 +169,6 @@ gbt_int8_distance(PG_FUNCTION_ARGS)
                                      &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_int8_union(PG_FUNCTION_ARGS)
 {
@@ -184,7 +179,6 @@ gbt_int8_union(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_int8_penalty(PG_FUNCTION_ARGS)
 {
index 8f99a4169652b4c46eaf78e582369b82e54bd971..ac0108e62801ffa85c85e79aeb7d6050291a0339 100644 (file)
@@ -14,10 +14,7 @@ typedef struct
                upper;
 } intvKEY;
 
-
-/*
-** Interval ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_intv_compress);
 PG_FUNCTION_INFO_V1(gbt_intv_fetch);
 PG_FUNCTION_INFO_V1(gbt_intv_decompress);
@@ -137,10 +134,9 @@ interval_dist(PG_FUNCTION_ARGS)
 
 
 /**************************************************
- * interval ops
+ * GiST support functions
  **************************************************/
 
-
 Datum
 gbt_intv_compress(PG_FUNCTION_ARGS)
 {
index 558cfa2172fe7aa71491af2a59fe6720977fffeb..41e693cb2c2f23ebd7109418481165b2d835a98e 100644 (file)
@@ -15,9 +15,7 @@ typedef struct
    char        pad[4];         /* make struct size = sizeof(gbtreekey16) */
 } macKEY;
 
-/*
-** OID ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_macad_compress);
 PG_FUNCTION_INFO_V1(gbt_macad_fetch);
 PG_FUNCTION_INFO_V1(gbt_macad_union);
@@ -88,11 +86,9 @@ static const gbtree_ninfo tinfo =
 
 
 /**************************************************
- * macaddr ops
+ * GiST support functions
  **************************************************/
 
-
-
 static uint64
 mac_2_uint64(macaddr *m)
 {
@@ -105,8 +101,6 @@ mac_2_uint64(macaddr *m)
    return res;
 }
 
-
-
 Datum
 gbt_macad_compress(PG_FUNCTION_ARGS)
 {
index 5d0c5509f5169e68cd40db89ba19f65dd5d6a9cd..613a19e317b9c7c5c14246081f504e490e954dff 100644 (file)
@@ -15,9 +15,7 @@ typedef struct
    /* make struct size = sizeof(gbtreekey16) */
 } mac8KEY;
 
-/*
-** OID ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_macad8_compress);
 PG_FUNCTION_INFO_V1(gbt_macad8_fetch);
 PG_FUNCTION_INFO_V1(gbt_macad8_union);
@@ -26,7 +24,6 @@ PG_FUNCTION_INFO_V1(gbt_macad8_consistent);
 PG_FUNCTION_INFO_V1(gbt_macad8_penalty);
 PG_FUNCTION_INFO_V1(gbt_macad8_same);
 
-
 static bool
 gbt_macad8gt(const void *a, const void *b, FmgrInfo *flinfo)
 {
@@ -88,11 +85,9 @@ static const gbtree_ninfo tinfo =
 
 
 /**************************************************
- * macaddr ops
+ * GiST support functions
  **************************************************/
 
-
-
 static uint64
 mac8_2_uint64(macaddr8 *m)
 {
@@ -105,8 +100,6 @@ mac8_2_uint64(macaddr8 *m)
    return res;
 }
 
-
-
 Datum
 gbt_macad8_compress(PG_FUNCTION_ARGS)
 {
@@ -145,7 +138,6 @@ gbt_macad8_consistent(PG_FUNCTION_ARGS)
                                      GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_macad8_union(PG_FUNCTION_ARGS)
 {
@@ -156,7 +148,6 @@ gbt_macad8_union(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_macad8_penalty(PG_FUNCTION_ARGS)
 {
index d533648a295a8d142ef724ddd4d1416d2c6b8551..f34e00818bb6be97c372f91f35f3748a2ae1617b 100644 (file)
@@ -12,9 +12,7 @@
 #include "utils/numeric.h"
 #include "utils/rel.h"
 
-/*
-** Bytea ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_numeric_compress);
 PG_FUNCTION_INFO_V1(gbt_numeric_union);
 PG_FUNCTION_INFO_V1(gbt_numeric_picksplit);
@@ -90,10 +88,9 @@ static const gbtree_vinfo tinfo =
 
 
 /**************************************************
- * Text ops
+ * GiST support functions
  **************************************************/
 
-
 Datum
 gbt_numeric_compress(PG_FUNCTION_ARGS)
 {
@@ -102,8 +99,6 @@ gbt_numeric_compress(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(gbt_var_compress(entry, &tinfo));
 }
 
-
-
 Datum
 gbt_numeric_consistent(PG_FUNCTION_ARGS)
 {
@@ -125,8 +120,6 @@ gbt_numeric_consistent(PG_FUNCTION_ARGS)
    PG_RETURN_BOOL(retval);
 }
 
-
-
 Datum
 gbt_numeric_union(PG_FUNCTION_ARGS)
 {
@@ -137,7 +130,6 @@ gbt_numeric_union(PG_FUNCTION_ARGS)
                                    &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_numeric_same(PG_FUNCTION_ARGS)
 {
@@ -149,7 +141,6 @@ gbt_numeric_same(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(result);
 }
 
-
 Datum
 gbt_numeric_penalty(PG_FUNCTION_ARGS)
 {
@@ -215,8 +206,6 @@ gbt_numeric_penalty(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(result);
 }
 
-
-
 Datum
 gbt_numeric_picksplit(PG_FUNCTION_ARGS)
 {
index d1976f4f0910d02a2022a8bd94dd747475b23839..d9afffe7827c5d250678a2a3e25d637324b34a17 100644 (file)
@@ -12,9 +12,7 @@ typedef struct
    Oid         upper;
 } oidKEY;
 
-/*
-** OID ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_oid_compress);
 PG_FUNCTION_INFO_V1(gbt_oid_fetch);
 PG_FUNCTION_INFO_V1(gbt_oid_union);
@@ -113,10 +111,9 @@ oid_dist(PG_FUNCTION_ARGS)
 
 
 /**************************************************
- * Oid ops
+ * GiST support functions
  **************************************************/
 
-
 Datum
 gbt_oid_compress(PG_FUNCTION_ARGS)
 {
@@ -155,7 +152,6 @@ gbt_oid_consistent(PG_FUNCTION_ARGS)
                                      GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_oid_distance(PG_FUNCTION_ARGS)
 {
@@ -173,7 +169,6 @@ gbt_oid_distance(PG_FUNCTION_ARGS)
                                      &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_oid_union(PG_FUNCTION_ARGS)
 {
@@ -184,7 +179,6 @@ gbt_oid_union(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_oid_penalty(PG_FUNCTION_ARGS)
 {
index 8f80f54240f8f2369f8c303c128d336420ee339f..ed706e3eaa7f751c6de0cce45cf83fe414093fef 100644 (file)
@@ -8,9 +8,7 @@
 #include "mb/pg_wchar.h"
 #include "utils/fmgrprotos.h"
 
-/*
-** Text ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_text_compress);
 PG_FUNCTION_INFO_V1(gbt_bpchar_compress);
 PG_FUNCTION_INFO_V1(gbt_text_union);
@@ -163,10 +161,9 @@ static gbtree_vinfo bptinfo =
 
 
 /**************************************************
- * Text ops
+ * GiST support functions
  **************************************************/
 
-
 Datum
 gbt_text_compress(PG_FUNCTION_ARGS)
 {
@@ -187,8 +184,6 @@ gbt_bpchar_compress(PG_FUNCTION_ARGS)
    return gbt_text_compress(fcinfo);
 }
 
-
-
 Datum
 gbt_text_consistent(PG_FUNCTION_ARGS)
 {
@@ -216,7 +211,6 @@ gbt_text_consistent(PG_FUNCTION_ARGS)
    PG_RETURN_BOOL(retval);
 }
 
-
 Datum
 gbt_bpchar_consistent(PG_FUNCTION_ARGS)
 {
@@ -243,7 +237,6 @@ gbt_bpchar_consistent(PG_FUNCTION_ARGS)
    PG_RETURN_BOOL(retval);
 }
 
-
 Datum
 gbt_text_union(PG_FUNCTION_ARGS)
 {
@@ -254,7 +247,6 @@ gbt_text_union(PG_FUNCTION_ARGS)
                                    &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_text_picksplit(PG_FUNCTION_ARGS)
 {
@@ -277,7 +269,6 @@ gbt_text_same(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(result);
 }
 
-
 Datum
 gbt_text_penalty(PG_FUNCTION_ARGS)
 {
index 2f7859340f641a3f1344aa6328922589565daf1a..79a895159b20906c3365219d531eb3ef3a0544d4 100644 (file)
@@ -15,9 +15,7 @@ typedef struct
    TimeADT     upper;
 } timeKEY;
 
-/*
-** time ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_time_compress);
 PG_FUNCTION_INFO_V1(gbt_timetz_compress);
 PG_FUNCTION_INFO_V1(gbt_time_fetch);
@@ -92,8 +90,6 @@ gbt_timelt(const void *a, const void *b, FmgrInfo *flinfo)
                                            TimeADTGetDatumFast(*bb)));
 }
 
-
-
 static int
 gbt_timekey_cmp(const void *a, const void *b, FmgrInfo *flinfo)
 {
@@ -150,11 +146,9 @@ time_dist(PG_FUNCTION_ARGS)
 
 
 /**************************************************
- * time ops
+ * GiST support functions
  **************************************************/
 
-
-
 Datum
 gbt_time_compress(PG_FUNCTION_ARGS)
 {
@@ -163,7 +157,6 @@ gbt_time_compress(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(gbt_num_compress(entry, &tinfo));
 }
 
-
 Datum
 gbt_timetz_compress(PG_FUNCTION_ARGS)
 {
@@ -262,7 +255,6 @@ gbt_timetz_consistent(PG_FUNCTION_ARGS)
                                      GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_time_union(PG_FUNCTION_ARGS)
 {
@@ -273,7 +265,6 @@ gbt_time_union(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
-
 Datum
 gbt_time_penalty(PG_FUNCTION_ARGS)
 {
@@ -313,7 +304,6 @@ gbt_time_penalty(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(result);
 }
 
-
 Datum
 gbt_time_picksplit(PG_FUNCTION_ARGS)
 {
index 9e0d979dda98916150da7c1d64250a31f6c1df25..ba3535892eb167c2ca87484959bd20e2c0902c71 100644 (file)
@@ -17,9 +17,7 @@ typedef struct
    Timestamp   upper;
 } tsKEY;
 
-/*
-** timestamp ops
-*/
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_ts_compress);
 PG_FUNCTION_INFO_V1(gbt_tstz_compress);
 PG_FUNCTION_INFO_V1(gbt_ts_fetch);
@@ -40,6 +38,8 @@ PG_FUNCTION_INFO_V1(gbt_ts_same);
 #endif
 
 
+/* define for comparison */
+
 static bool
 gbt_tsgt(const void *a, const void *b, FmgrInfo *flinfo)
 {
@@ -95,7 +95,6 @@ gbt_tslt(const void *a, const void *b, FmgrInfo *flinfo)
                                            TimestampGetDatumFast(*bb)));
 }
 
-
 static int
 gbt_tskey_cmp(const void *a, const void *b, FmgrInfo *flinfo)
 {
@@ -126,7 +125,6 @@ gbt_ts_dist(const void *a, const void *b, FmgrInfo *flinfo)
    return fabs(INTERVAL_TO_SEC(i));
 }
 
-
 static const gbtree_ninfo tinfo =
 {
    gbt_t_ts,
@@ -190,12 +188,10 @@ tstz_dist(PG_FUNCTION_ARGS)
    PG_RETURN_INTERVAL_P(abs_interval(r));
 }
 
-
 /**************************************************
- * timestamp ops
+ * GiST support functions
  **************************************************/
 
-
 static inline Timestamp
 tstz_to_ts_gmt(TimestampTz ts)
 {
@@ -212,7 +208,6 @@ gbt_ts_compress(PG_FUNCTION_ARGS)
    PG_RETURN_POINTER(gbt_num_compress(entry, &tinfo));
 }
 
-
 Datum
 gbt_tstz_compress(PG_FUNCTION_ARGS)
 {
index f4c5c6e58929e92804d647059b9d2ea65f3f4532..02480808a4a22e54bf08f4221db9b3b097768642 100644 (file)
@@ -15,9 +15,7 @@ typedef struct
 } uuidKEY;
 
 
-/*
- * UUID ops
- */
+/* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_uuid_compress);
 PG_FUNCTION_INFO_V1(gbt_uuid_fetch);
 PG_FUNCTION_INFO_V1(gbt_uuid_union);
@@ -93,10 +91,9 @@ static const gbtree_ninfo tinfo =
 
 
 /**************************************************
- * uuid ops
+ * GiST support functions
  **************************************************/
 
-
 Datum
 gbt_uuid_compress(PG_FUNCTION_ARGS)
 {