1. 16 Nov, 2007 1 commit
  2. 15 Nov, 2007 1 commit
  3. 24 Oct, 2007 1 commit
  4. 23 Oct, 2007 1 commit
    • Tom Lane's avatar
      Fix several bugs in tsvectorin, including crash due to uninitialized field and · bb36c51f
      Tom Lane authored
      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.
      bb36c51f
  5. 11 Sep, 2007 1 commit
    • Teodor Sigaev's avatar
      Refactor from Heikki Linnakangas <heikki@enterprisedb.com>: · 57cafe79
      Teodor Sigaev authored
      * Defined new struct WordEntryPosVector that holds a uint16 length and a
      variable size array of WordEntries. This replaces the previous
      convention of a variable size uint16 array, with the first element
      implying the length. WordEntryPosVector has the same layout in memory,
      but is more readable in source code. The POSDATAPTR and POSDATALEN
      macros are still used, though it would now be more readable to access
      the fields in WordEntryPosVector directly.
      
      * Removed needfree field from DocRepresentation. It was always set to false.
      
      * Miscellaneous other commenting and refactoring
      57cafe79
  6. 07 Sep, 2007 2 commits
    • Teodor Sigaev's avatar
      Improvements from Heikki Linnakangas <heikki@enterprisedb.com> · 978de9d0
      Teodor Sigaev authored
      - 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.
      978de9d0
    • Teodor Sigaev's avatar
      Refactoring by Heikki Linnakangas <heikki@enterprisedb.com> with · e5be8998
      Teodor Sigaev authored
      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.
      e5be8998
  7. 31 Aug, 2007 1 commit
  8. 21 Aug, 2007 1 commit