Skip to content
Snippets Groups Projects
  1. Feb 23, 2007
    • Tom Lane's avatar
      Now that plans have flat rangetable lists, it's a lot easier to get EXPLAIN to · 655aa5b3
      Tom Lane authored
      drill down into subplan targetlists to print the referent expression for an
      OUTER or INNER var in an upper plan node.  Hence, make it do that always, and
      banish the old hack of showing "?columnN?" when things got too complicated.
      
      Along the way, fix an EXPLAIN bug I introduced by suppressing subqueries from
      execution-time range tables: get_name_for_var_field() assumed it could look at
      rte->subquery to find out the real type of a RECORD var.  That doesn't work
      anymore, but instead we can look at the input plan of the SubqueryScan plan
      node.
      655aa5b3
    • Bruce Momjian's avatar
      Move BLCKSZ < 1024 check to guc.c. · 9cc2a71c
      Bruce Momjian authored
      9cc2a71c
    • Tom Lane's avatar
      Change Agg and Group nodes so that Vars contained in their targetlists · cc77005d
      Tom Lane authored
      and quals have varno OUTER, rather than zero, to indicate a reference to
      an output of their lefttree subplan.  This is consistent with the way
      that every other upper-level node type does it, and allows some simplifications
      in setrefs.c and EXPLAIN.
      cc77005d
  2. Feb 22, 2007
    • Tom Lane's avatar
      Turn the rangetable used by the executor into a flat list, and avoid storing · eab6b8b2
      Tom Lane authored
      useless substructure for its RangeTblEntry nodes.  (I chose to keep using the
      same struct node type and just zero out the link fields for unneeded info,
      rather than making a separate ExecRangeTblEntry type --- it seemed too
      fragile to have two different rangetable representations.)
      
      Along the way, put subplans into a list in the toplevel PlannedStmt node,
      and have SubPlan nodes refer to them by list index instead of direct pointers.
      Vadim wanted to do that years ago, but I never understood what he was on about
      until now.  It makes things a *whole* lot more robust, because we can stop
      worrying about duplicate processing of subplans during expression tree
      traversals.  That's been a constant source of bugs, and it's finally gone.
      
      There are some consequent simplifications yet to be made, like not using
      a separate EState for subplans in the executor, but I'll tackle that later.
      eab6b8b2
  3. Feb 20, 2007
    • Tom Lane's avatar
      Remove the Query structure from the executor's API. This allows us to stop · 9cbd0c15
      Tom Lane authored
      storing mostly-redundant Query trees in prepared statements, portals, etc.
      To replace Query, a new node type called PlannedStmt is inserted by the
      planner at the top of a completed plan tree; this carries just the fields of
      Query that are still needed at runtime.  The statement lists kept in portals
      etc. now consist of intermixed PlannedStmt and bare utility-statement nodes
      --- no Query.  This incidentally allows us to remove some fields from Query
      and Plan nodes that shouldn't have been there in the first place.
      
      Still to do: simplify the execution-time range table; at the moment the
      range table passed to the executor still contains Query trees for subqueries.
      
      initdb forced due to change of stored rules.
      9cbd0c15
  4. Feb 19, 2007
  5. Feb 17, 2007
  6. Feb 16, 2007
  7. Feb 14, 2007
    • Bruce Momjian's avatar
      Fix to_date()/to_timestamp() 'D' field for day of week, was off by one. · 76412247
      Bruce Momjian authored
      Converting from char using 'D' doesn't make lots of sense, of course.
      
      Report from Brendan Jurd.
      76412247
    • Neil Conway's avatar
    • Tom Lane's avatar
      Fix up foreign-key mechanism so that there is a sound semantic basis for the · 7bddca34
      Tom Lane authored
      equality checks it applies, instead of a random dependence on whatever
      operators might be named "=".  The equality operators will now be selected
      from the opfamily of the unique index that the FK constraint depends on to
      enforce uniqueness of the referenced columns; therefore they are certain to be
      consistent with that index's notion of equality.  Among other things this
      should fix the problem noted awhile back that pg_dump may fail for foreign-key
      constraints on user-defined types when the required operators aren't in the
      search path.  This also means that the former warning condition about "foreign
      key constraint will require costly sequential scans" is gone: if the
      comparison condition isn't indexable then we'll reject the constraint
      entirely. All per past discussions.
      
      Along the way, make the RI triggers look into pg_constraint for their
      information, instead of using pg_trigger.tgargs; and get rid of the always
      error-prone fixed-size string buffers in ri_triggers.c in favor of building up
      the RI queries in StringInfo buffers.
      
      initdb forced due to columns added to pg_constraint and pg_trigger.
      7bddca34
  8. Feb 13, 2007
  9. Feb 11, 2007
  10. Feb 10, 2007
  11. Feb 09, 2007
  12. Feb 08, 2007
  13. Feb 07, 2007
  14. Feb 03, 2007
  15. Feb 01, 2007
    • Bruce Momjian's avatar
      Wording cleanup for error messages. Also change can't -> cannot. · 8b4ff8b6
      Bruce Momjian authored
      Standard English uses "may", "can", and "might" in different ways:
      
              may - permission, "You may borrow my rake."
      
              can - ability, "I can lift that log."
      
              might - possibility, "It might rain today."
      
      Unfortunately, in conversational English, their use is often mixed, as
      in, "You may use this variable to do X", when in fact, "can" is a better
      choice.  Similarly, "It may crash" is better stated, "It might crash".
      8b4ff8b6
  16. Jan 31, 2007
    • Neil Conway's avatar
      Rewrite uuid input and output routines to avoid dependency on the · 05ce7d6a
      Neil Conway authored
      nonportable "hh" sprintf(3) length modifier. Instead, do the parsing
      and output by hand. The code to do this isn't ideal, but this is
      an interim measure anyway: the uuid type should probably use the
      in-memory struct layout specified by RFC 4122. For now, this patch
      should hopefully rectify the buildfarm failures for the uuid test.
      
      Along the way, re-add pg_cast entries for uuid <-> varchar, which
      I mistakenly removed earlier, and bump the catversion.
      05ce7d6a
    • Teodor Sigaev's avatar
      Revert gincostestimate changes. · 61f621b5
      Teodor Sigaev authored
      61f621b5
Loading