Skip to content
Snippets Groups Projects
  1. Jan 19, 2006
  2. Jan 18, 2006
    • Neil Conway's avatar
      Add a new system view, pg_cursors, that displays the currently available · 33e06ebc
      Neil Conway authored
      cursors. Patch from Joachim Wieland, review and ediorialization by Neil
      Conway. The view lists cursors defined by DECLARE CURSOR, using SPI, or
      via the Bind message of the frontend/backend protocol. This means the
      view does not list the unnamed portal or the portal created to implement
      EXECUTE. Because we do list SPI portals, there might be more rows in
      this view than you might expect if you are using SPI implicitly (e.g.
      via a procedural language).
      
      Per recent discussion on -hackers, the query string included in the
      view for cursors defined by DECLARE CURSOR is based on
      debug_query_string. That means it is not accurate if multiple queries
      separated by semicolons are submitted as one query string. However,
      there doesn't seem a trivial fix for that: debug_query_string
      is better than nothing. I also changed SPI_cursor_open() to include
      the source text for the portal it creates: AFAICS there is no reason
      not to do this.
      
      Update the documentation and regression tests, bump the catversion.
      33e06ebc
  3. Jan 14, 2006
  4. Jan 12, 2006
    • Neil Conway's avatar
      mbutils was previously doing some allocations, including invoking · d3a4d633
      Neil Conway authored
      fmgr_info(), in the TopMemoryContext. I couldn't see that the code
      actually leaked, but in general I think it's fragile to assume that
      pfree'ing an FmgrInfo along with its fn_extra field is enough to
      reclaim all the resources allocated by fmgr_info().  I changed the
      code to do its allocations in a new child context of
      TopMemoryContext, MbProcContext. When we want to release the
      allocations we can just reset the context, which is cleaner.
      d3a4d633
  5. Jan 11, 2006
  6. 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
  7. Jan 09, 2006
  8. Jan 08, 2006
  9. Jan 07, 2006
    • Tom Lane's avatar
      During CatCacheRemoveCList, we must now remove any members that are · 7eb54281
      Tom Lane authored
      dead and have become unreferenced.  Before 8.1, such members were left
      for AtEOXact_CatCache() to clean up, but now AtEOXact_CatCache isn't
      supposed to have anything to do.  In an assert-enabled build this bug
      leads to an assertion failure at transaction end, but in a non-assert
      build the dead member is effectively just a small memory leak.
      Per report from Jeremy Drake.
      7eb54281
  10. Jan 05, 2006
  11. Jan 04, 2006
  12. Jan 02, 2006
  13. Jan 01, 2006
    • Tom Lane's avatar
      Rewrite ProcessConfigFile() to avoid misbehavior at EOF, as per report · fc6da31a
      Tom Lane authored
      from Andrus Moor.  The former state-machine-style coding wasn't actually
      doing much except obscuring the control flow, and it didn't extend
      readily to fix this case, so I just took it out.  Also, add a
      YY_FLUSH_BUFFER call to ensure the lexer is reset correctly if the
      previous scan failed partway through the file.
      fc6da31a
  14. Dec 30, 2005
  15. Dec 29, 2005
  16. Dec 28, 2005
    • Tom Lane's avatar
      Move plpgsql's fetchArgInfo() into funcapi.c, and rename to · 15093bf2
      Tom Lane authored
      get_func_arg_info() for consistency with other names there.
      This code will probably be useful to other PLs when they start to
      support OUT parameters, so better to have it in the main backend.
      Also, fix plpgsql validator to detect bogus OUT parameters even when
      check_function_bodies is off.
      15093bf2
    • 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
      Remove silly use of DLLIMPORT. · a4e51699
      Tom Lane authored
      a4e51699
    • 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
  17. Dec 26, 2005
  18. 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
  19. Dec 24, 2005
  20. Dec 23, 2005
  21. 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
  22. Dec 20, 2005
  23. Dec 10, 2005
  24. Dec 09, 2005
    • Peter Eisentraut's avatar
    • 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
Loading