1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Add KNNGIST support to contrib/pg_trgm.

Teodor Sigaev, with some revision by Tom
This commit is contained in:
Tom Lane
2010-12-04 00:16:21 -05:00
parent b576757d7e
commit b525bf771e
9 changed files with 214 additions and 43 deletions

View File

@ -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__ */