1. 09 Apr, 2009 5 commits
    • Tom Lane's avatar
    • Tom Lane's avatar
      Remove SQL-compatibility function cardinality(). It is not exactly clear · 06e27572
      Tom Lane authored
      how this ought to behave for multi-dimensional arrays.  Per discussion,
      not having it at all seems better than having it with what might prove
      to be the wrong behavior.  We can always add it later when we have consensus
      on the correct behavior.
      06e27572
    • Bruce Momjian's avatar
    • Tom Lane's avatar
      Treat EOF like \n for line-counting purposes in ParseConfigFile, · b060c878
      Tom Lane authored
      per bug #4752.  Fujii Masao
      b060c878
    • Tom Lane's avatar
      Fix the plpgsql memory leak exhibited in bug #4677. That leak was introduced · 03cd7571
      Tom Lane authored
      by my patch of 2007-01-28 to use per-subtransaction ExprContexts/EStates:
      since we re-prepared any expression tree when the current subtransaction ID
      changed, we'd accumulate more and more leaked expression state trees in the
      outermost subtransaction if the same function was executed at multiple levels
      of subtransaction nesting.  To fix, go back to the previous scheme where
      there was only one EState per transaction for simple plpgsql expressions.
      We really only need an ExprContext per subtransaction, not a whole EState,
      so it's possible to keep prepared expression state trees in the one EState
      throughout the transaction.  This should be more efficient as well as not
      leaking memory for cases involving lots of subtransactions.
      
      The added regression test is the case that inspired the 2007-01-28 patch in
      the first place, just to make sure we didn't go backwards.  The current
      memory leak complaint is unfortunately hard to test for in the regression
      test framework, though manual testing shows it's fixed.
      
      Although this is a pre-existing bug, I'm not back-patching because I'd like to
      see this method get some field testing first.  Consider back-patching if it
      gets through 8.4beta unscathed.
      03cd7571
  2. 08 Apr, 2009 7 commits
  3. 07 Apr, 2009 11 commits
  4. 06 Apr, 2009 12 commits
  5. 05 Apr, 2009 5 commits
    • Tom Lane's avatar
      Change cardinality() into a C-code function, instead of a SQL-language · f2110a75
      Tom Lane authored
      alias for array_length(v,1).  The efficiency gain here is doubtless
      negligible --- what I'm interested in is making sure that if we have
      second thoughts about the definition, we will not have to force a
      post-beta initdb to change the implementation.
      f2110a75
    • Tom Lane's avatar
      Make ExecInitExpr build the list of SubPlans found in a plan tree in order · eb4c723e
      Tom Lane authored
      of discovery, rather than reverse order.  This doesn't matter functionally
      (I suppose the previous coding dates from the time when lcons was markedly
      cheaper than lappend).  However now that EXPLAIN is labeling subplans with
      IDs that are based on order of creation, this may help produce a slightly
      less surprising printout.
      eb4c723e
    • Tom Lane's avatar
      Change EXPLAIN output so that subplans and initplans (particularly CTEs) · fbcce080
      Tom Lane authored
      are individually labeled, rather than just grouped under an "InitPlan"
      or "SubPlan" heading.  This in turn makes it possible for decompilation of
      a subplan reference to usefully identify which subplan it's referencing.
      I also made InitPlans identify which parameter symbol(s) they compute,
      so that references to those parameters elsewhere in the plan tree can
      be connected to the initplan that will be executed.  Per a gripe from
      Robert Haas about EXPLAIN output of a WITH query being inadequate,
      plus some longstanding pet peeves of my own.
      fbcce080
    • Teodor Sigaev's avatar
      Fix infinite loop while checking of partial match in pending list. · 329a5322
      Teodor Sigaev authored
      Improve comments. Now GIN-indexable operators should be strict.
      Per Tom's questions/suggestions.
      329a5322
    • Tom Lane's avatar
      Remove a boatload of useless definitions of 'int optreset'. If we · 27fbfd39
      Tom Lane authored
      are using our own ports of getopt or getopt_long, those will define
      the variable for themselves; and if not, we don't need these, because
      we never touch the variable anyway.
      27fbfd39