1. 20 Aug, 2012 4 commits
  2. 19 Aug, 2012 2 commits
  3. 18 Aug, 2012 2 commits
    • Tom Lane's avatar
      Make use of LATERAL in information_schema.sequences view. · c246eb5a
      Tom Lane authored
      It said "XXX: The following could be improved if we had LATERAL" ...
      so let's do that.
      
      No catversion bump since either version of the view works fine.
      c246eb5a
    • Tom Lane's avatar
      Another round of planner fixes for LATERAL. · 084a29c9
      Tom Lane authored
      Formerly, subquery pullup had no need to examine other entries in the range
      table, since they could not contain any references to the subquery being
      pulled up.  That's no longer true with LATERAL, so now we need to be able
      to visit rangetable subexpressions to replace Vars referencing the
      pulled-up subquery.  Also, this means that extract_lateral_references must
      be unsurprised at encountering lateral PlaceHolderVars, since such might be
      created when pulling up a subquery that's underneath an outer join with
      respect to the lateral reference.
      084a29c9
  4. 17 Aug, 2012 3 commits
  5. 16 Aug, 2012 18 commits
  6. 15 Aug, 2012 11 commits
    • Bruce Momjian's avatar
    • Bruce Momjian's avatar
      Update C comment to NOTICE to reflect previous commit changing the error · 41fa3dfb
      Bruce Momjian authored
      level, per report from Tom.
      41fa3dfb
    • Bruce Momjian's avatar
      In psql, if the is no connection object, e.g. due to a server crash, · fe21fcaf
      Bruce Momjian authored
      require all parameters for \c, rather than using the defaults, which
      might be wrong.
      fe21fcaf
    • Tom Lane's avatar
      Fix rescan logic in nodeCtescan. · 4c531693
      Tom Lane authored
      The previous coding essentially assumed that nodes would be rescanned in
      the same order they were initialized in; or at least that the "leader" of
      a group of CTEscans would be rescanned before any others were required to
      execute.  Unfortunately, that isn't even a little bit true.  It's possible
      to devise queries in which the leader isn't rescanned until other CTEscans
      on the same CTE have run to completion, or even in which the leader never
      gets a rescan call at all.
      
      The fix makes the leader specially responsible only for initial creation
      and final destruction of the tuplestore; rescan resets are now a
      symmetrically shared responsibility.  This means that we might reset the
      tuplestore multiple times when restarting a plan subtree containing
      multiple CTEscans; but resetting an already-empty tuplestore is cheap
      enough that that doesn't seem like a problem.
      
      Per report from Adam Mackler; the new regression test cases are based on
      his example query.
      
      Back-patch to 8.4 where CTE scans were introduced.
      4c531693
    • Bruce Momjian's avatar
      On second thought, explain why date_trunc("week") on interval values is · 083b9133
      Bruce Momjian authored
      not supported in the error message, rather than the docs.
      083b9133
    • Bruce Momjian's avatar
    • Bruce Momjian's avatar
    • Bruce Momjian's avatar
      Document that foreign "version" and "type" values are only useful to · fc5f2005
      Bruce Momjian authored
      certain foreign data wrappers.
      fc5f2005
    • Tom Lane's avatar
      Disallow extensions from owning the schema they are assigned to. · 4d642b59
      Tom Lane authored
      This situation creates a dependency loop that confuses pg_dump and probably
      other things.  Moreover, since the mental model is that the extension
      "contains" schemas it owns, but "is contained in" its extschema (even
      though neither is strictly true), having both true at once is confusing for
      people too.  So prevent the situation from being set up.
      
      Reported and patched by Thom Brown.  Back-patch to 9.1 where extensions
      were added.
      4d642b59
    • Bruce Momjian's avatar
      Properly escape usernames in initdb, so names with single-quotes are · a9732965
      Bruce Momjian authored
      supported.  Also add assert to catch future breakage.
      
      Also, improve documentation that "double"-quotes must be used in
      pg_hba.conf (not single quotes).
      a9732965
    • Tom Lane's avatar
      Resurrect the "last ditch" code path in join_search_one_level(). · eb919e8f
      Tom Lane authored
      This essentially reverts commit e54b10a6,
      in which I'd decided that the "last ditch" join logic was useless.  The
      folly of that is now exposed by a report from Pavel Stehule: although the
      function should always find at least one join in a self-contained join
      problem, it can still fail to do so in a sub-problem created by artificial
      from_collapse_limit or join_collapse_limit constraints.  Adjust the
      comments to describe this, and simplify the code a bit to match the new
      coding of the earlier loop in the function.
      
      I'm not terribly happy about this: I still subscribe to the opinion stated
      in the previous commit message that the "last ditch" code can obscure logic
      bugs elsewhere.  But the alternative seems to be to complicate the earlier
      tests for does-this-relation-have-a-join-clause to the point where they can
      tell whether the join clauses link outside the current join sub-problem.
      And that looks messy, slow, and possibly a source of bugs in itself.
      In any case, now is not the time to be inserting experimental code into
      9.2, so let's just go back to the time-tested solution.
      eb919e8f