summaryrefslogtreecommitdiff
path: root/contrib/tsearch2/query.c
AgeCommit message (Collapse)Author
2007-11-13Replace the now-incompatible-with-core contrib/tsearch2 module with aTom Lane
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
2007-02-28Fix up several contrib modules that were using varlena datatypes in ↵Tom Lane
not-so-obvious ways. I'm not totally sure that I caught everything, but at least now they pass their regression tests with VARSIZE/SET_VARSIZE defined to reverse byte order.
2007-02-27Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len).Tom Lane
Get rid of VARATT_SIZE and VARATT_DATA, which were simply redundant with VARSIZE and VARDATA, and as a consequence almost no code was using the longer names. Rename the length fields of struct varlena and various derived structures to catch anyplace that was accessing them directly; and clean up various places so caught. In itself this patch doesn't change any behavior at all, but it is necessary infrastructure if we hope to play any games with the representation of varlena headers. Greg Stark and Tom Lane
2007-02-12Fix backend crash in parsing incorrect tsquery.Teodor Sigaev
Per report from Jon Rosebaugh <jon@inklesspen.com>
2007-02-07Use memcpy() instead of strncpy() for copying into varlena structures.Peter Eisentraut
2006-10-04Improve error messages from to_tsquery per yesterday's discussion:Tom Lane
provide the bad input, and be sure to mention that we are talking about a tsearch query.
2006-10-04pgindent run for 8.2.Bruce Momjian
2006-09-02Use '' rather than \' for literal single quotes in strings inBruce Momjian
/contrib/tsearch2. Teodor Sigaev
2006-05-19Back out \' change for tsearch2, broke regression tests.Bruce Momjian
2006-05-19Use SQL standard '' rather than \' in /contrib. Backpatch to 8.1.X.Bruce Momjian
2006-03-01This patch makes the error message strings throughout the backendNeil Conway
more compliant with the error message style guide. In particular, errdetail should begin with a capital letter and end with a period, whereas errmsg should not. I also fixed a few related issues in passing, such as fixing the repeated misspelling of "lexeme" in contrib/tsearch2 (per Tom's suggestion).
2005-12-12Improve support of multibyte encoding:Teodor Sigaev
- tsvector_(in|out) - tsquery_(in|out) - to_tsvector - to_tsquery, plainto_tsquery - 'simple' dictionary
2005-11-22Re-run pgindent, fixing a problem where comment lines after a blankBruce Momjian
comment line where output as too long, and update typedefs for /lib directory. Also fix case where identifiers were used as variable names in the backend, but as typedefs in ecpg (favor the backend for indenting). Backpatch to 8.1.X.
2005-11-21Text parser rewritten:Teodor Sigaev
- supports multibyte encodings - more strict rules for lexemes - flex isn't used Add: - tsquery plainto_tsquery(text) Function makes tsquery from plain text. - &&, ||, !! operation for tsquery for combining tsquery from it's parts: 'foo & bar' || 'asd' => 'foo & bar | asd'
2005-11-08New features for tsearch2:Teodor Sigaev
1 Comparison operation for tsquery 2 Btree index on tsquery 3 numnode(tsquery) - returns 'length' of tsquery 4 tsquery @ tsquery, tsquery ~ tsquery - contains, contained for tsquery. Note: They don't gurantee exact result, only MAY BE, so it useful only for speed up rewrite functions 5 GiST index support for @,~ 6 rewrite(): select rewrite(orig, what, to); select rewrite(ARRAY[orig, what, to]) from tsquery_table; select rewrite(orig, 'select what, to from tsquery_table;'); 7 significantly improve cover algorithm
2005-11-07R-tree is dead ... long live GiST.Tom Lane
2005-10-281 Fix problem with lost precision in rank with OR-ed lexemesTeodor Sigaev
2 Allow tsquery_in to input void tsquery: resolve dump/restore problem with tsquery
2005-10-15Standard pgindent run for 8.1.Bruce Momjian
2005-09-24Clean up possibly-uninitialized-variable warnings reported by gcc 4.x.Tom Lane
2005-09-24Suppress signed-vs-unsigned-char warnings in contrib.Tom Lane
2005-05-25Add parentheses to macros when args are used in computations. WithoutBruce Momjian
them, the executation behavior could be unexpected.
2005-01-25improve support of agglutinative languages (query with compound words).Teodor Sigaev
regression=# select to_tsquery( '\'fotballklubber\''); to_tsquery ------------------------------------------------ 'fotball' & 'klubb' | 'fot' & 'ball' & 'klubb' (1 row) So, changed interface to dictionaries, lexize method of dictionary shoud return pointer to aray of TSLexeme structs instead of char**. Last element should have TSLexeme->lexeme == NULL. typedef struct { /* number of variant of split word , for example Word 'fotballklubber' (norwegian) has two varian to split: ( fotball, klubb ) and ( fot, ball, klubb ). So, dictionary should return: nvariant lexeme 1 fotball 1 klubb 2 fot 2 ball 2 klubb */ uint16 nvariant; /* currently unused */ uint16 flags; /* C-string */ char *lexeme; } TSLexeme;
2005-01-25ChangeTeodor Sigaev
typedef struct {} WordEntryPos; to typedef uint16 WordEntryPos according to http://www.pgsql.ru/db/mw/msg.html?mid=2035188 Require re-fill all tsvector fields and reindex tsvector indexes.
2004-11-09This patch makes some cleanups to contrib/ to silence some sparseNeil Conway
warnings: - remove pointless "extern" keyword from some function definitions in contrib/tsearch2 - use "NULL" not "0" as NULL pointer in contrib/tsearch, contrib/tsearch2, contrib/pgbench, and contrib/vacuumlo
2004-08-29Pgindent run for 8.0.Bruce Momjian
2004-05-311 add namespaces as Tom suggest http://www.pgsql.ru/db/mw/msg.html?mid=1987703Teodor Sigaev
2 remove select qeury in inserts
2004-05-31Win32 related patch by Darko Prenosil. Small correct by teodorTeodor Sigaev
2003-12-03Fix for word with several infinitivesTeodor Sigaev
2003-11-27Fixes about word with several infiniteveTeodor Sigaev
2003-09-12Fix incorrect pfree in to_tsquery_name(), per Nigel Andrews.Tom Lane
2003-08-28More accuracy works with stopwords in queriesTeodor Sigaev
2003-08-04pgindent run.Bruce Momjian
2003-07-24Error message editing in contrib (mostly by Joe Conway --- thanks Joe!)Tom Lane
2003-07-21tsearch2 moduleTeodor Sigaev