summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/tsvector.c
AgeCommit message (Collapse)Author
2017-01-17Generate fmgr prototypes automaticallyPeter Eisentraut
Gen_fmgrtab.pl creates a new file fmgrprotos.h, which contains prototypes for all functions registered in pg_proc.h. This avoids having to manually maintain these prototypes across a random variety of header files. It also automatically enforces a correct function signature, and since there are warnings about missing prototypes, it will detect functions that are defined but not registered in pg_proc.h (or otherwise used). Reviewed-by: Pavel Stehule <[email protected]>
2017-01-03Update copyright via script for 2017Bruce Momjian
2016-04-08Rename comparePos() to compareWordEntryPos()Teodor Sigaev
Rename comparePos() to compareWordEntryPos() to prevent export of too generic name. Per gripe from Tom Lane.
2016-04-07Phrase full text search.Teodor Sigaev
Patch introduces new text search operator (<-> or <DISTANCE>) into tsquery. On-disk and binary in/out format of tsquery are backward compatible. It has two side effect: - change order for tsquery, so, users, who has a btree index over tsquery, should reindex it - less number of parenthesis in tsquery output, and tsquery becomes more readable Authors: Teodor Sigaev, Oleg Bartunov, Dmitry Ivanov Reviewers: Alexander Korotkov, Artur Zakirov
2016-01-02Update copyright for 2016Bruce Momjian
Backpatch certain files through 9.1
2015-01-06Update copyright for 2015Bruce Momjian
Backpatch certain files through 9.0
2014-03-07Avoid memcpy() with same source and destination address.Heikki Linnakangas
The behavior of that is undefined, although unlikely to lead to problems in practice. Found by running regression tests with Valgrind.
2014-01-07Update copyright for 2014Bruce Momjian
Update all files in head, and files COPYRIGHT and legal.sgml in all back branches.
2013-01-01Update copyrights for 2013Bruce Momjian
Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
2012-06-24Replace int2/int4 in C code with int16/int32Peter Eisentraut
The latter was already the dominant use, and it's preferable because in C the convention is that intXX means XX bits. Therefore, allowing mixed use of int2, int4, int8, int16, int32 is obviously confusing. Remove the typedefs for int2 and int4 for now. They don't seem to be widely used outside of the PostgreSQL source tree, and the few uses can probably be cleaned up by the time this ships.
2012-05-14Remove unnecessary pg_verifymbstr() calls from tsvector/query in functions.Heikki Linnakangas
The input should've been validated well before it hits the input function. Doing so again is a waste of cycles.
2012-01-01Update copyright notices for year 2012.Bruce Momjian
2011-09-01Remove unnecessary #include references, per pgrminclude script.Bruce Momjian
2011-01-01Stamp copyrights for year 2011.Bruce Momjian
2010-09-20Remove cvs keywords from all files.Magnus Hagander
2010-01-02Update copyright for the year 2010.Bruce Momjian
2009-06-118.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef listBruce Momjian
provided by Andrew.
2009-05-21Resort tsvector's lexemes in tsvectorrecv instead of emmiting an error.Teodor Sigaev
Basically, it's needed to support binary dump from 8.3 because ordering rule was changed. Per discussion with Bruce.
2009-05-21Removed comparison of unsigned expression < 0.Michael Meskes
2009-01-01Update copyright for 2009.Bruce Momjian
2008-05-16Extend GIN to support partial-match searches, and extend tsquery to supportTom Lane
prefix matching using this facility. Teodor Sigaev and Oleg Bartunov
2008-03-10Fix unportable coding of new error message, per Kris Jurka.Tom Lane
2008-03-05When text search string is too long, in error message report actual andBruce Momjian
maximum number of bytes allowed.
2008-01-01Update copyrights in source tree to 2008.Bruce Momjian
2007-11-28Make a cleanup pass over error reports in tsearch code. Use ereportTom Lane
for user-facing errors, fix some poor choices of errcode, adhere to message style guide.
2007-11-16Fix tsvectorout() and tsqueryout() to escape backslesh, add test of that.Teodor Sigaev
Patch by Bruce Momjian <[email protected]> Backpatch is needed, but it's impossible to apply it directly
2007-11-15Re-run pgindent with updated list of typedefs. (Updated README shouldBruce Momjian
avoid this problem in the future.)
2007-11-15pgindent run for 8.3.Bruce Momjian
2007-10-23Fix several bugs in tsvectorin, including crash due to uninitialized field andTom Lane
miscomputation of required palloc size. The crash could only occur if the input contained lexemes both with and without positions, which is probably not common in practice. The miscomputation would definitely result in wasted space. Also fix some inconsistent coding around alignment of strings and positions in a tsvector value; these errors could also lead to crashes given mixed with/without position data and a machine that's picky about alignment. And be more careful about checking for overflow of string offsets. Patch is only against HEAD --- I have not looked to see if same bugs are in back-branch contrib/tsearch2 code.
2007-10-21Fix shared tsvector/tsquery input code so that we don't say "syntax error inTom Lane
tsvector" when we are really parsing a tsquery. Report the bogus input, too. Make styles of some related error messages more consistent.
2007-09-07Improvements from Heikki Linnakangas <[email protected]>Teodor Sigaev
- change the alignment requirement of lexemes in TSVector slightly. Lexeme strings were always padded to 2-byte aligned length to make sure that if there's position array (uint16[]) it has the right alignment. The patch changes that so that the padding is not done when there's no positions. That makes the storage of tsvectors without positions slightly more compact. - added some #include "miscadmin.h" lines I missed in the earlier when I added calls to check_stack_depth(). - Reimplement the send/recv functions, and added a comment above them describing the on-wire format. The CRC is now recalculated in tsquery as well per previous discussion.
2007-09-07Refactoring by Heikki Linnakangas <[email protected]> withTeodor Sigaev
small editorization by me - Brake the QueryItem struct into QueryOperator and QueryOperand. Type was really the only common field between them. QueryItem still exists, and is used in the TSQuery struct as before, but it's now a union of the two. Many other changes fell from that, like separation of pushval_asis function into pushValue, pushOperator and pushStop. - Moved some structs that were for internal use only from header files to the right .c-files. - Moved tsvector parser to a new tsvector_parser.c file. Parser code was about half of the size of tsvector.c, it's also used from tsquery.c, and it has some data structures of its own, so it seems better to separate it. Cleaned up the API so that TSVectorParserState is not accessed from outside tsvector_parser.c. - Separated enumerations (#defines, really) used for QueryItem.type field and as return codes from gettoken_query. It was just accidental code sharing. - Removed ParseQueryNode struct used internally by makepol and friends. push*-functions now construct QueryItems directly. - Changed int4 variables to just ints for variables like "i" or "array size", where the storage-size was not significant.
2007-08-21Fix a small 64-bit problem in tsearch patch.Tom Lane
2007-08-21Tsearch2 functionality migrates to core. The bulk of this work is byTom Lane
Oleg Bartunov and Teodor Sigaev, but I did a lot of editorializing, so anything that's broken is probably my fault. Documentation is nonexistent as yet, but let's land the patch so we can get some portability testing done.