diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-11-13 21:02:29 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-11-13 21:02:29 +0000 |
commit | 90e3f2aca716e562f81a64dba5fb5232b140e4d7 (patch) | |
tree | 2040468fc9a6e902614d48b03912da6859e95bf7 /contrib/tsearch2/query_util.h | |
parent | 4ea3210a04478163edf1ffd7d2547b62e82df4f0 (diff) |
Replace the now-incompatible-with-core contrib/tsearch2 module with a
compatibility package. This supports importing dumps from past versions
using tsearch2, and provides the old names and API for most functions
that were changed. (rewrite(ARRAY[...]) is a glaring omission, though.)
Pavel Stehule and Tom Lane
Diffstat (limited to 'contrib/tsearch2/query_util.h')
-rw-r--r-- | contrib/tsearch2/query_util.h | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/contrib/tsearch2/query_util.h b/contrib/tsearch2/query_util.h deleted file mode 100644 index 5ed98e628dd..00000000000 --- a/contrib/tsearch2/query_util.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef __QUERY_UTIL_H__ -#define __QUERY_UTIL_H__ - -#include "postgres.h" -#include "utils/memutils.h" - -#include "query.h" -#include "executor/spi.h" - -typedef struct QTNode -{ - ITEM *valnode; - uint32 flags; - int4 nchild; - char *word; - uint32 sign; - struct QTNode **child; -} QTNode; - -#define QTN_NEEDFREE 0x01 -#define QTN_NOCHANGE 0x02 -#define QTN_WORDFREE 0x04 - -typedef enum -{ - PlainMemory, - SPIMemory, - AggMemory -} MemoryType; - -QTNode *QT2QTN(ITEM * in, char *operand); -QUERYTYPE *QTN2QT(QTNode * in, MemoryType memtype); -void QTNFree(QTNode * in); -void QTNSort(QTNode * in); -void QTNTernary(QTNode * in); -void QTNBinary(QTNode * in); -int QTNodeCompare(QTNode * an, QTNode * bn); -QTNode *QTNCopy(QTNode * in, MemoryType memtype); -bool QTNEq(QTNode * a, QTNode * b); - - -extern MemoryContext AggregateContext; - -#define MEMALLOC(us, s) ( ((us)==SPIMemory) ? SPI_palloc(s) : ( ( (us)==PlainMemory ) ? palloc(s) : MemoryContextAlloc(AggregateContext, (s)) ) ) -#define MEMFREE(us, p) ( ((us)==SPIMemory) ? SPI_pfree(p) : pfree(p) ) - -#endif |