diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2025-04-03 13:39:33 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2025-04-03 13:39:33 +0300 |
commit | 9370978da8ac8f0e31867859282b0f2be724fe48 (patch) | |
tree | 5da91f476e7ba9eee548ee67eeabea80f5f1ded9 /contrib/btree_gist/btree_ts.c | |
parent | 82a46cca99fa967cc3c6c2cf55254dd44eebbcfd (diff) | |
download | postgresql-9370978da8ac8f0e31867859282b0f2be724fe48.tar.gz postgresql-9370978da8ac8f0e31867859282b0f2be724fe48.zip |
Fix boilerplate comments in btree_gist
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.
Diffstat (limited to 'contrib/btree_gist/btree_ts.c')
-rw-r--r-- | contrib/btree_gist/btree_ts.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/contrib/btree_gist/btree_ts.c b/contrib/btree_gist/btree_ts.c index 9e0d979dda9..ba3535892eb 100644 --- a/contrib/btree_gist/btree_ts.c +++ b/contrib/btree_gist/btree_ts.c @@ -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) { |