diff --git a/src/rrtimeslice.c b/src/rrtimeslice.c
index d34da914a53713f40e9c5589ed424209868791a7..b08662292178e979c71c1d1c9e41bcb9855d6fe8 100644 (file)
--- a/src/rrtimeslice.c
+++ b/src/rrtimeslice.c
#include <fmgr.h>
/* Postgres utilities */
+#include <access/hash.h>
#include <executor/spi.h>
#include <utils/array.h>
#include <utils/datetime.h>
PG_FUNCTION_INFO_V1(rrtimeslice_le);
PG_FUNCTION_INFO_V1(rrtimeslice_ge);
PG_FUNCTION_INFO_V1(rrtimeslice_cmp);
+PG_FUNCTION_INFO_V1(rrtimeslice_hash);
/*
* public API
PG_RETURN_INT32(rrtimeslice_cmp_internal(ts1, ts2));
} /* rrtimeslice_ge */
+Datum
+rrtimeslice_hash(PG_FUNCTION_ARGS)
+{
+ rrtimeslice_t *ts = PG_GETARG_RRTIMESLICE_P(0);
+ return hash_uint32(ts->seq);
+} /* rrtimeslice_hash */
+
/* vim: set tw=78 sw=4 ts=4 noexpandtab : */