1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Stat function now can show statistics per weight of lexemes

This commit is contained in:
Teodor Sigaev
2004-05-28 15:36:49 +00:00
parent 1b9ef0025d
commit a6ea6457fa
6 changed files with 160 additions and 37 deletions

View File

@ -20,10 +20,11 @@ typedef struct
{
int4 len;
int4 size;
int4 weight;
char data[1];
} tsstat;
#define STATHDRSIZE (sizeof(int4)*2)
#define STATHDRSIZE (sizeof(int4)*4)
#define CALCSTATSIZE(x, lenstr) ( x * sizeof(StatEntry) + STATHDRSIZE + lenstr )
#define STATPTR(x) ( (StatEntry*) ( (char*)x + STATHDRSIZE ) )
#define STATSTRPTR(x) ( (char*)x + STATHDRSIZE + ( sizeof(StatEntry) * ((tsvector*)x)->size ) )