Skip to content
Snippets Groups Projects
  1. Nov 15, 2007
  2. Nov 13, 2007
  3. Oct 24, 2007
    • Tom Lane's avatar
      Set read_only = TRUE while evaluating input queries for ts_rewrite() · 1c927249
      Tom Lane authored
      and ts_stat(), per my recent suggestion.  Also add a possibly-not-needed-
      but-can't-hurt check for NULL SPI_tuptable, before we try to dereference
      same.
      1c927249
    • Tom Lane's avatar
      Remove the aggregate form of ts_rewrite(), since it doesn't work as desired · 592c88a0
      Tom Lane authored
      if there are zero rows to aggregate over, and the API seems both conceptually
      and notationally ugly anyway.  We should look for something that improves
      on the tsquery-and-text-SELECT version (which is also pretty ugly but at
      least it works...), but it seems that will take query infrastructure that
      doesn't exist today.  (Hm, I wonder if there's anything in or near SQL2003
      window functions that would help?)  Per discussion.
      592c88a0
  4. Oct 23, 2007
  5. Sep 07, 2007
    • 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
      Improving various checks by Heikki Linnakangas <heikki@enterprisedb.com> · 8983852e
      Teodor Sigaev authored
      - add code to check that the query tree is well-formed. It was indeed
        possible to send malformed queries in binary mode, which produced all
        kinds of strange results.
      
      - make the left-field a uint32. There's no reason to
        arbitrarily limit it to 16-bits, and it won't increase the disk/memory
        footprint either now that QueryOperator and QueryOperand are separate
        structs.
      
      - add check_stack_depth() call to all recursive functions I found.
        Some of them might have a natural limit so that you can't force
        arbitrarily deep recursions, but check_stack_depth() is cheap enough
        that seems best to just stick it into anything that might be a problem.
      8983852e
    • 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
  6. Aug 21, 2007
  7. Feb 28, 2007
  8. May 31, 2006
  9. Mar 01, 2006
    • Neil Conway's avatar
      This patch makes the error message strings throughout the backend · 8e5a10d4
      Neil Conway authored
      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).
      8e5a10d4
  10. Nov 22, 2005
  11. Nov 17, 2005
    • Tom Lane's avatar
      Make SQL arrays support null elements. This commit fixes the core array · cecb6075
      Tom Lane authored
      functionality, but I still need to make another pass looking at places
      that incidentally use arrays (such as ACL manipulation) to make sure they
      are null-safe.  Contrib needs work too.
      I have not changed the behaviors that are still under discussion about
      array comparison and what to do with lower bounds.
      cecb6075
  12. Nov 09, 2005
  13. Nov 08, 2005
    • Teodor Sigaev's avatar
      New features for tsearch2: · 0645663e
      Teodor Sigaev authored
      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
      0645663e
Loading