Skip to content
Snippets Groups Projects
  1. Mar 02, 2006
  2. Mar 01, 2006
    • Neil Conway's avatar
      Attached is a patch that replaces a bunch of places where StringInfos · 0d9742f9
      Neil Conway authored
      are unnecessarily allocated on the heap rather than the stack. If the
      StringInfo doesn't outlive the stack frame in which it is created,
      there is no need to allocate it on the heap via makeStringInfo() --
      stack allocation is faster.  While it's not a big deal unless the
      code is in a critical path, I don't see a reason not to save a few
      cycles -- using stack allocation is not less readable.
      
      I also cleaned up a bit of code along the way: moved variable
      declarations into a more tightly-enclosing scope where possible,
      fixed some pointless copying of strings in dblink, etc.
      0d9742f9
  3. Feb 28, 2006
    • Tom Lane's avatar
      Allow the syntax CREATE TYPE foo, with no parameters, to permit explicit · 8e68d783
      Tom Lane authored
      creation of a shell type.  This allows a less hacky way of dealing with
      the mutual dependency between a datatype and its I/O functions: make a
      shell type, then make the functions, then define the datatype fully.
      We should fix pg_dump to handle things this way, but this commit just deals
      with the backend.
      
      Martijn van Oosterhout, with some corrections by Tom Lane.
      8e68d783
  4. Feb 27, 2006
  5. Feb 26, 2006
  6. Feb 13, 2006
  7. Feb 12, 2006
  8. Feb 11, 2006
  9. Feb 09, 2006
  10. Feb 07, 2006
    • Bruce Momjian's avatar
      Source code cleanup. · ad177f10
      Bruce Momjian authored
      ad177f10
    • Bruce Momjian's avatar
      I think that NUMERIC datatype has a problem in the performance that · e7a9ccdb
      Bruce Momjian authored
      the format on Tuple(Numeric) and the format to calculate(NumericVar)
      are different. I understood that to reduce I/O. However, when many
      comparisons or calculations of NUMERIC are executed, the conversion
      of Numeric and NumericVar becomes a bottleneck.
      
      It is profile result when "create index on NUMERIC column" is executed:
      
        %   cumulative   self              self     total
       time   seconds   seconds    calls   s/call   s/call  name
       17.61     10.27    10.27 34542006     0.00     0.00  cmp_numerics
       11.90     17.21     6.94 34542006     0.00     0.00  comparetup_index
        7.42     21.54     4.33 71102587     0.00     0.00  AllocSetAlloc
        7.02     25.64     4.09 69084012     0.00     0.00  set_var_from_num
        4.87     28.48     2.84 69084012     0.00     0.00  alloc_var
        4.79     31.27     2.79 142205745     0.00     0.00  AllocSetFreeIndex
        4.55     33.92     2.65 34542004     0.00     0.00  cmp_abs
        4.07     36.30     2.38 71101189     0.00     0.00  AllocSetFree
        3.83     38.53     2.23 69084012     0.00     0.00  free_var
      
      The create index command executes many comparisons of Numeric values.
      Functions other than comparetup_index spent a lot of cycles for
      conversion from Numeric to NumericVar.
      
      An attached patch enables the comparison of Numeric values without
      executing conversion to NumericVar. The execution time of that SQL
      becomes half.
      
      o Test SQL (index_test table has 1,000,000 tuples)
       create index index_test_idx on index_test(num_col);
      
      o Test results (executed the test five times)
      (1)PentiumIII
       original: 39.789s  36.823s  36.737s  37.752s  37.019s
       patched : 18.560s  19.103s  18.830s  18.408s  18.853s
        4.07     36.30     2.38 71101189     0.00     0.00  AllocSetFree
        3.83     38.53     2.23 69084012     0.00     0.00  free_var
      
      The create index command executes many comparisons of Numeric values.
      Functions other than comparetup_index spent a lot of cycles for
      conversion from Numeric to NumericVar.
      
      An attached patch enables the comparison of Numeric values without
      executing conversion to NumericVar. The execution time of that SQL
      becomes half.
      
      o Test SQL (index_test table has 1,000,000 tuples)
       create index index_test_idx on index_test(num_col);
      
      o Test results (executed the test five times)
      (1)PentiumIII
       original: 39.789s  36.823s  36.737s  37.752s  37.019s
       patched : 18.560s  19.103s  18.830s  18.408s  18.853s
      
      (2)Pentium4
       original: 16.349s  14.997s  12.979s  13.169s  12.955s
       patched :  7.005s   6.594s   6.770s   6.740s   6.828s
      
      (3)Itanium2
       original: 15.392s  15.447s  15.350s  15.370s  15.417s
       patched :  7.413s   7.330s   7.334s   7.339s   7.339s
      
      (4)Ultra Sparc
       original: 64.435s  59.336s  59.332s  58.455s  59.781s
       patched : 28.630s  28.666s  28.983s  28.744s  28.595s
      
      Atsushi Ogawa
      e7a9ccdb
  11. Feb 03, 2006
  12. Jan 26, 2006
  13. Jan 25, 2006
  14. Jan 23, 2006
  15. Jan 21, 2006
    • Bruce Momjian's avatar
      Add GRANT ON SEQUENCE syntax to support sequence-only permissions. · 4789e988
      Bruce Momjian authored
      Continue to support GRANT ON [TABLE] for sequences for backward
      compatibility;  issue warning for invalid sequence permissions.
      
      [Backward compatibility warning message.]
      
      Add USAGE permission for sequences that allows only currval() and
      nextval(), not setval().
      
      Mention object name in grant/revoke warnings because of possible
      multi-object operations.
      4789e988
  16. Jan 14, 2006
  17. Jan 11, 2006
  18. Jan 10, 2006
    • Tom Lane's avatar
      Improve patternsel() by applying the operator itself to each value · ce8fd39e
      Tom Lane authored
      listed in the column's most-common-values statistics entry.  This gives
      us an exact selectivity result for the portion of the column population
      represented by the MCV list, which can be a big leg up in accuracy if
      that's a large fraction of the population.  The heuristics involving
      pattern contents and prefix are applied only to the part of the population
      not included in the MCV list.
      ce8fd39e
  19. Jan 02, 2006
  20. Dec 30, 2005
  21. Dec 29, 2005
  22. Dec 28, 2005
    • Bruce Momjian's avatar
      Mention "table" in "violates foreign key constraint" message that was · 776d63f9
      Bruce Momjian authored
      lacking it.  Perhaps it was suppressed because of line length
      considerations, but "table" should appear.
      776d63f9
    • Tom Lane's avatar
      Implement SQL-compliant treatment of row comparisons for < <= > >= cases · 6e077097
      Tom Lane authored
      (previously we only did = and <> correctly).  Also, allow row comparisons
      with any operators that are in btree opclasses, not only those with these
      specific names.  This gets rid of a whole lot of indefensible assumptions
      about the behavior of particular operators based on their names ... though
      it's still true that IN and NOT IN expand to "= ANY".  The patch adds a
      RowCompareExpr expression node type, and makes some changes in the
      representation of ANY/ALL/ROWCOMPARE SubLinks so that they can share code
      with RowCompareExpr.
      
      I have not yet done anything about making RowCompareExpr an indexable
      operator, but will look at that soon.
      
      initdb forced due to changes in stored rules.
      6e077097
  23. Dec 25, 2005
    • Bruce Momjian's avatar
      I have added these macros to c.h: · 261114a2
      Bruce Momjian authored
              #define HIGHBIT                 (0x80)
              #define IS_HIGHBIT_SET(ch)      ((unsigned char)(ch) & HIGHBIT)
      
      and removed CSIGNBIT and mapped it uses to HIGHBIT.  I have also added
      uses for IS_HIGHBIT_SET where appropriate.  This change is
      purely for code clarity.
      261114a2
  24. Dec 22, 2005
    • Tom Lane's avatar
      Adjust string comparison so that only bitwise-equal strings are considered · 656beff5
      Tom Lane authored
      equal: if strcoll claims two strings are equal, check it with strcmp, and
      sort according to strcmp if not identical.  This fixes inconsistent
      behavior under glibc's hu_HU locale, and probably under some other locales
      as well.  Also, take advantage of the now-well-defined behavior to speed up
      texteq, textne, bpchareq, bpcharne: they may as well just do a bitwise
      comparison and not bother with strcoll at all.
      
      NOTE: affected databases may need to REINDEX indexes on text columns to be
      sure they are self-consistent.
      656beff5
  25. Dec 10, 2005
  26. Dec 09, 2005
    • Tom Lane's avatar
      Simplify lock manager data structures by making a clear separation between · c599a247
      Tom Lane authored
      the data defining the semantics of a lock method (ie, conflict resolution
      table and ancillary data, which is all constant) and the hash tables
      storing the current state.  The only thing we give up by this is the
      ability to use separate hashtables for different lock methods, but there
      is no need for that anyway.  Put some extra fields into the LockMethod
      definition structs to clean up some other uglinesses, like hard-wired
      tests for DEFAULT_LOCKMETHOD and USER_LOCKMETHOD.  This commit doesn't
      do anything about the performance issues we were discussing, but it clears
      away some of the underbrush that's in the way of fixing that.
      c599a247
  27. Dec 03, 2005
    • Bruce Momjian's avatar
      Allow to_char(interval) and to_char(time) to use AM/PM specifications. · d20901a3
      Bruce Momjian authored
      Map them to a single day, so '30 hours' is 'AM'.
      
      Have to_char(interval) and to_char(time) use "HH", "HH12" as 12-hour
      intervals, rather than bypass and print the full interval hours.  This
      is neeeded because to_char(time) is mapped to interval in this function.
      Intervals should use "HH24", and document suggestion.
      
      Allow "D" format specifiers for interval/time.
      d20901a3
  28. Dec 02, 2005
  29. Dec 01, 2005
Loading