Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

fti-new.c File Reference

#include "server/postgres.h"
#include <ctype.h>
#include <wctype.h>
#include <wchar.h>
#include <iconv.h>
#include <errno.h>
#include "server/executor/spi.h"
#include "server/commands/trigger.h"
#include <stdlib.h>
#include <unistd.h>
#include <locale.h>
#include <time.h>

Include dependency graph for fti-new.c:

Include dependency graph

Go to the source code of this file.

Classes

struct  SubStrRec

Defines

#define substrhashsize   10000

Typedefs

typedef SubStrRec SubStrRec

Functions

Datum fti (PG_FUNCTION_ARGS)
wchar_t * breakup (wchar_t *, long)
int stopword_cmp (const void *a, const void *b)
bool is_stopword (wchar_t *)
Oid lookupSubString (wchar_t *)
void insertSubString (wchar_t *, Oid)
bool ischar (const wint_t c)
wchar_t * mb2wc (char *s, long *len)
char * wc2mb (wchar_t *s, long *len)
char * codec (char *s, int len, char *from, char *to, long *wclen)
long mywcslen (wchar_t *s)
void insert (char *column, HeapTuple t, Oid oid, char *relname)
void del (Oid oid, char *relname)
 PG_FUNCTION_INFO_V1 (fti)

Variables

double codec_time = 0
double breakup_time = 0
double overall_time = 0
double ins_substr_time = 0
double lookup_substr_time = 0
double lookup_stopword_time = 0
double sql_time = 0
bool new_tuple = false
wchar_t ** stopwords = 0L
int stopwordcount = 0
SubStrRecsubstrhash [substrhashsize]


Define Documentation

#define substrhashsize   10000
 

Definition at line 45 of file fti-new.c.

Referenced by fti(), insertSubString(), and lookupSubString().


Typedef Documentation

typedef struct SubStrRec SubStrRec
 

Referenced by insertSubString().


Function Documentation

wchar_t * breakup wchar_t *  ,
long 
[static]
 

Definition at line 405 of file fti-new.c.

References breakup_time, ischar(), and new_tuple.

Referenced by insert().

char * codec char *  s,
int  len,
char *  from,
char *  to,
long *  wclen
[static]
 

Definition at line 464 of file fti-new.c.

References codec_time.

Referenced by mb2wc(), and wc2mb().

void del Oid  oid,
char *  relname
[static]
 

Definition at line 210 of file fti-new.c.

Referenced by fti().

Datum fti PG_FUNCTION_ARGS   ) 
 

Definition at line 52 of file fti-new.c.

References del(), insert(), overall_time, stopwordcount, stopwords, substrhash, and substrhashsize.

void insert char *  column,
HeapTuple  t,
Oid  oid,
char *  relname
[static]
 

Definition at line 219 of file fti-new.c.

References breakup(), insertSubString(), is_stopword(), lookupSubString(), mb2wc(), new_tuple, sql_time, stopwordcount, stopwords, and wc2mb().

Referenced by fti().

void insertSubString wchar_t *  ,
Oid 
[static]
 

Definition at line 377 of file fti-new.c.

References ins_substr_time, SubStrRec::next, SubStrRec::oid, substrhash, substrhashsize, SubStrRec, and SubStrRec::text.

Referenced by insert().

bool is_stopword wchar_t *   )  [static]
 

Definition at line 440 of file fti-new.c.

References lookup_stopword_time, stopword_cmp(), stopwordcount, and stopwords.

Referenced by insert().

bool ischar const wint_t  c  )  [static]
 

Definition at line 448 of file fti-new.c.

Referenced by breakup().

Oid lookupSubString wchar_t *   )  [static]
 

Definition at line 352 of file fti-new.c.

References lookup_substr_time, SubStrRec::next, SubStrRec::oid, substrhash, substrhashsize, and SubStrRec::text.

Referenced by insert().

wchar_t * mb2wc char *  s,
long *  len
[static]
 

Definition at line 453 of file fti-new.c.

References codec().

Referenced by insert().

long mywcslen wchar_t *  s  )  [static]
 

Definition at line 498 of file fti-new.c.

Referenced by wc2mb().

PG_FUNCTION_INFO_V1 fti   ) 
 

int stopword_cmp const void *  a,
const void *  b
[static]
 

Definition at line 433 of file fti-new.c.

Referenced by is_stopword().

char * wc2mb wchar_t *  s,
long *  len
[static]
 

Definition at line 459 of file fti-new.c.

References codec(), and mywcslen().

Referenced by insert().


Variable Documentation

double breakup_time = 0
 

Definition at line 22 of file fti-new.c.

Referenced by breakup().

double codec_time = 0
 

Definition at line 21 of file fti-new.c.

Referenced by codec().

double ins_substr_time = 0
 

Definition at line 24 of file fti-new.c.

Referenced by insertSubString().

double lookup_stopword_time = 0
 

Definition at line 26 of file fti-new.c.

Referenced by is_stopword().

double lookup_substr_time = 0
 

Definition at line 25 of file fti-new.c.

Referenced by lookupSubString().

bool new_tuple = false [static]
 

Definition at line 33 of file fti-new.c.

Referenced by breakup(), and insert().

double overall_time = 0
 

Definition at line 23 of file fti-new.c.

Referenced by fti().

double sql_time = 0
 

Definition at line 27 of file fti-new.c.

Referenced by insert().

int stopwordcount = 0
 

Definition at line 44 of file fti-new.c.

Referenced by fti(), insert(), and is_stopword().

wchar_t** stopwords = 0L
 

Definition at line 43 of file fti-new.c.

Referenced by fti(), insert(), and is_stopword().

SubStrRec* substrhash[substrhashsize]
 

Definition at line 46 of file fti-new.c.

Referenced by fti(), insertSubString(), and lookupSubString().


Generated on Sat Mar 27 19:21:06 2004 for Literature by doxygen 1.3.6-20040222