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

tsearch2 module

This commit is contained in:
Teodor Sigaev
2003-07-21 10:27:44 +00:00
parent a605382670
commit b88605337e
63 changed files with 16908 additions and 0 deletions

24
contrib/tsearch2/common.h Normal file
View File

@ -0,0 +1,24 @@
#ifndef __TS_COMMON_H__
#define __TS_COMMON_H__
#include "postgres.h"
#include "fmgr.h"
#ifndef PG_NARGS
#define PG_NARGS() (fcinfo->nargs)
#endif
text* char2text(char* in);
text* charl2text(char* in, int len);
char *text2char(text* in);
char *pnstrdup(char* in, int len);
text *ptextdup(text* in);
text *mtextdup(text* in);
int text_cmp(text *a, text *b);
#define NEXTVAL(x) ( (text*)( (char*)(x) + INTALIGN( VARSIZE(x) ) ) )
#define ARRNELEMS(x) ArrayGetNItems( ARR_NDIM(x), ARR_DIMS(x))
void ts_error(int state, const char *format, ...);
#endif