1. 02 Jul, 2006 3 commits
    • Bruce Momjian's avatar
      Done: · 5d5c1416
      Bruce Momjian authored
      > * -Add fillfactor to control reserved free space during index creation
      5d5c1416
    • Bruce Momjian's avatar
      Done: · ff3003e5
      Bruce Momjian authored
      < 	o Add ALTER TABLE tab ADD/DROP INHERITS parent
      <
      < 	  This allows tables to be added/removed from an inheritance
      < 	  hierarchy.  This is particularly useful for table partitioning.
      < 	  http://archives.postgresql.org/pgsql-hackers/2006-05/msg00988.php
      <
      > 	o -Add ALTER TABLE tab INHERIT / NO INHERIT  parent
      ff3003e5
    • Bruce Momjian's avatar
      ALTER TABLE ... ADD/DROPS INHERIT (actually INHERIT / NO INHERIT) · 8c092781
      Bruce Momjian authored
      Open items:
      
      There were a few tangentially related issues that have come up that I think
      are TODOs. I'm likely to tackle one or two of these next so I'm interested in
      hearing feedback on them as well.
      
      . Constraints currently do not know anything about inheritance. Tom suggested
        adding a coninhcount and conislocal like attributes have to track their
        inheritance status.
      
      . Foreign key constraints currently do not get copied to new children (and
        therefore my code doesn't verify them). I don't think it would be hard to
        add them and treat them like CHECK constraints.
      
      . No constraints at all are copied to tables defined with LIKE. That makes it
        hard to use LIKE to define new partitions. The standard defines LIKE and
        specifically says it does not copy constraints. But the standard already has
        an option called INCLUDING DEFAULTS; we could always define a non-standard
        extension LIKE table INCLUDING CONSTRAINTS that gives the user the option to
        request a copy including constraints.
      
      . Personally, I think the whole attislocal thing is bunk. The decision about
        whether to drop a column from children tables or not is something that
        should be up to the user and trying to DWIM based on whether there was ever
        a local definition or the column was acquired purely through inheritance is
        hardly ever going to match up with user expectations.
      
      . And of course there's the whole unique and primary key constraint issue. I
        think to get any traction at all on this you have a prerequisite of a real
        partitioned table implementation where the system knows what the partition
        key is so it can recognize when it's a leading part of an index key.
      
      Greg Stark
      8c092781
  2. 01 Jul, 2006 2 commits
    • Tom Lane's avatar
      Fix oversight in planning for multiple indexscans driven by · 08ccdf02
      Tom Lane authored
      ScalarArrayOpExpr index quals: we were estimating the right total
      number of rows returned, but treating the index-access part of the
      cost as if a single scan were fetching that many consecutive index
      tuples.  Actually we should treat it as a multiple indexscan, and
      if there are enough of 'em the Mackert-Lohman discount should kick in.
      08ccdf02
    • Tom Lane's avatar
      Revise the planner's handling of "pseudoconstant" WHERE clauses, that is · cffd89ca
      Tom Lane authored
      clauses containing no variables and no volatile functions.  Such a clause
      can be used as a one-time qual in a gating Result plan node, to suppress
      plan execution entirely when it is false.  Even when the clause is true,
      putting it in a gating node wins by avoiding repeated evaluation of the
      clause.  In previous PG releases, query_planner() would do this for
      pseudoconstant clauses appearing at the top level of the jointree, but
      there was no ability to generate a gating Result deeper in the plan tree.
      To fix it, get rid of the special case in query_planner(), and instead
      process pseudoconstant clauses through the normal RestrictInfo qual
      distribution mechanism.  When a pseudoconstant clause is found attached to
      a path node in create_plan(), pull it out and generate a gating Result at
      that point.  This requires special-casing pseudoconstants in selectivity
      estimation and cost_qual_eval, but on the whole it's pretty clean.
      It probably even makes the planner a bit faster than before for the normal
      case of no pseudoconstants, since removing pull_constant_clauses saves one
      useless traversal of the qual tree.  Per gripe from Phil Frost.
      cffd89ca
  3. 30 Jun, 2006 3 commits
  4. 29 Jun, 2006 4 commits
  5. 28 Jun, 2006 11 commits
  6. 27 Jun, 2006 17 commits