Code

rrtimeslice: Added hash function and operator class.
[postrr.git] / src / postrr.h.in
index 3db5045169ffe7817244b9ce40137c71665faf64..9a25d4e9f0c76375cbaab4a97c6ac85273644e2a 100644 (file)
@@ -94,6 +94,8 @@ Datum
 rrtimeslice_ge(PG_FUNCTION_ARGS);
 Datum
 rrtimeslice_cmp(PG_FUNCTION_ARGS);
+Datum
+rrtimeslice_hash(PG_FUNCTION_ARGS);
 
 /*
  * internal (not fmgr-callable) functions
@@ -102,6 +104,35 @@ rrtimeslice_cmp(PG_FUNCTION_ARGS);
 int
 rrtimeslice_cmp_internal(rrtimeslice_t *ts1, rrtimeslice_t *ts2);
 
+/*
+ * CData data type
+ */
+
+struct cdata;
+typedef struct cdata cdata_t;
+
+#define PG_GETARG_CDATA_P(n) (cdata_t *)PG_GETARG_POINTER(n)
+#define PG_RETURN_CDATA_P(p) PG_RETURN_POINTER(p)
+
+Datum
+cdata_validate(PG_FUNCTION_ARGS);
+
+/* I/O functions */
+Datum
+cdata_in(PG_FUNCTION_ARGS);
+Datum
+cdata_out(PG_FUNCTION_ARGS);
+Datum
+cdata_typmodin(PG_FUNCTION_ARGS);
+Datum
+cdata_typmodout(PG_FUNCTION_ARGS);
+
+/* casts */
+Datum
+cdata_to_cdata(PG_FUNCTION_ARGS);
+Datum
+int32_to_cdata(PG_FUNCTION_ARGS);
+
 #endif /* ! POSTRR_H */
 
 /* vim: set tw=78 sw=4 ts=4 noexpandtab : */