1. 01 Mar, 2005 4 commits
  2. 28 Feb, 2005 4 commits
  3. 27 Feb, 2005 7 commits
  4. 26 Feb, 2005 6 commits
  5. 25 Feb, 2005 10 commits
  6. 24 Feb, 2005 5 commits
  7. 23 Feb, 2005 4 commits
    • Neil Conway's avatar
      Minor code cleanup: remove a variable that was assigned to but never · 406a9428
      Neil Conway authored
      subsequently referenced.
      
      Found by: Coverity
      Fixed by: Sean Chittenden
      406a9428
    • Neil Conway's avatar
      This patch optimizes the md5_text() function (which is used to · 3350b374
      Neil Conway authored
      implement the md5() SQL-level function). The old code did the
      following:
      
      1. de-toast the datum
      2. convert it to a cstring via textout()
      3. get the length of the cstring via strlen()
      
      Since we are treating the datum context as a blob of binary data,
      the latter two steps are unnecessary. Once the data has been
      detoasted, we can just use it as-is, and derive its length from
      the varlena metadata.
      
      This patch improves some run-of-the-mill md5() computations by
      just under 10% in my limited tests, and passes the regression tests.
      
      I also noticed that md5_text() wasn't checking the return value
      of md5_hash(); encountering OOM at precisely the right moment
      could result in returning a random md5 hash. This patch corrects
      that. A better fix would be to make md5_hash() only return on
      success (and/or allocate via palloc()), but since it's used in
      the frontend as well I don't see an easy way to do that.
      3350b374
    • Tom Lane's avatar
      Un-break plpgsql build by removing unwanted _() usage. · b9a87e52
      Tom Lane authored
      This would be a completely inappropriate place to apply localization
      anyway.
      b9a87e52
    • Bruce Momjian's avatar
      Properly undef _(x) gettext macro. · e3267b65
      Bruce Momjian authored
      e3267b65