summaryrefslogtreecommitdiff
path: root/contrib/pg_trgm/trgm.h
diff options
context:
space:
mode:
authorTom Lane2010-12-04 05:16:21 +0000
committerTom Lane2010-12-04 05:16:21 +0000
commitb525bf771e31a2254f28bf25c6ed7987d64c8afb (patch)
tree65583461edd171150f868f7f769635f43976d807 /contrib/pg_trgm/trgm.h
parentb576757d7ee064ada5351c2e6a36c2f7234aa1d4 (diff)
Add KNNGIST support to contrib/pg_trgm.
Teodor Sigaev, with some revision by Tom
Diffstat (limited to 'contrib/pg_trgm/trgm.h')
-rw-r--r--contrib/pg_trgm/trgm.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/contrib/pg_trgm/trgm.h b/contrib/pg_trgm/trgm.h
index 85826733f55..1cc812554f7 100644
--- a/contrib/pg_trgm/trgm.h
+++ b/contrib/pg_trgm/trgm.h
@@ -4,12 +4,10 @@
#ifndef __TRGM_H__
#define __TRGM_H__
-#include "postgres.h"
-
#include "access/gist.h"
#include "access/itup.h"
-#include "utils/builtins.h"
#include "storage/bufpage.h"
+#include "utils/builtins.h"
/* options */
#define LPADDING 2
@@ -18,6 +16,10 @@
#define IGNORECASE
#define DIVUNION
+/* operator strategy numbers */
+#define SimilarityStrategyNumber 1
+#define DistanceStrategyNumber 2
+
typedef char trgm[3];
@@ -89,4 +91,4 @@ extern float4 trgm_limit;
TRGM *generate_trgm(char *str, int slen);
float4 cnt_sml(TRGM *trg1, TRGM *trg2);
-#endif
+#endif /* __TRGM_H__ */