Skip to content
Snippets Groups Projects
  1. Jan 05, 2012
  2. Jan 04, 2012
  3. Jan 03, 2012
  4. Jan 02, 2012
  5. Jan 01, 2012
  6. Dec 31, 2011
  7. Dec 30, 2011
  8. Dec 29, 2011
  9. Dec 28, 2011
  10. Dec 27, 2011
  11. Dec 26, 2011
  12. Dec 25, 2011
    • Tom Lane's avatar
      Rethink representation of index clauses' mapping to index columns. · 472d3935
      Tom Lane authored
      In commit e2c2c2e8 I made use of nested
      list structures to show which clauses went with which index columns, but
      on reflection that's a data structure that only an old-line Lisp hacker
      could love.  Worse, it adds unnecessary complication to the many places
      that don't much care which clauses go with which index columns.  Revert
      to the previous arrangement of flat lists of clauses, and instead add a
      parallel integer list of column numbers.  The places that care about the
      pairing can chase both lists with forboth(), while the places that don't
      care just examine one list the same as before.
      
      The only real downside to this is that there are now two more lists that
      need to be passed to amcostestimate functions in case they care about
      column matching (which btcostestimate does, so not passing the info is not
      an option).  Rather than deal with 11-argument amcostestimate functions,
      pass just the IndexPath and expect the functions to extract fields from it.
      That gets us down to 7 arguments which is better than 11, and it seems
      more future-proof against likely additions to the information we keep
      about an index path.
      472d3935
  13. Dec 24, 2011
    • Tom Lane's avatar
      Improve planner's handling of duplicated index column expressions. · e2c2c2e8
      Tom Lane authored
      It's potentially useful for an index to repeat the same indexable column
      or expression in multiple index columns, if the columns have different
      opclasses.  (If they share opclasses too, the duplicate column is pretty
      useless, but nonetheless we've allowed such cases since 9.0.)  However,
      the planner failed to cope with this, because createplan.c was relying on
      simple equal() matching to figure out which index column each index qual
      is intended for.  We do have that information available upstream in
      indxpath.c, though, so the fix is to not flatten the multi-level indexquals
      list when putting it into an IndexPath.  Then we can rely on the sublist
      structure to identify target index columns in createplan.c.  There's a
      similar issue for index ORDER BYs (the KNNGIST feature), so introduce a
      multi-level-list representation for that too.  This adds a bit more
      representational overhead, but we might more or less buy that back by not
      having to search for matching index columns anymore in createplan.c;
      likewise btcostestimate saves some cycles.
      
      Per bug #6351 from Christian Rudolph.  Likely symptoms include the "btree
      index keys must be ordered by attribute" failure shown there, as well as
      "operator MMMM is not a member of opfamily NNNN".
      
      Although this is a pre-existing problem that can be demonstrated in 9.0 and
      9.1, I'm not going to back-patch it, because the API changes in the planner
      seem likely to break things such as index plugins.  The corner cases where
      this matters seem too narrow to justify possibly breaking things in a minor
      release.
      e2c2c2e8
  14. Dec 23, 2011
  15. Dec 22, 2011
    • Robert Haas's avatar
      Typo fixes. · 0510b62d
      Robert Haas authored
      All noted by Jaime Casanova.
      0510b62d
    • Robert Haas's avatar
      Catversion bump for commit 0e4611c0. · 99b60fc0
      Robert Haas authored
      It changed the format of stored rules.
      99b60fc0
    • Robert Haas's avatar
      Add a security_barrier option for views. · 0e4611c0
      Robert Haas authored
      When a view is marked as a security barrier, it will not be pulled up
      into the containing query, and no quals will be pushed down into it,
      so that no function or operator chosen by the user can be applied to
      rows not exposed by the view.  Views not configured with this
      option cannot provide robust row-level security, but will perform far
      better.
      
      Patch by KaiGai Kohei; original problem report by Heikki Linnakangas
      (in October 2009!).  Review (in earlier versions) by Noah Misch and
      others.  Design advice by Tom Lane and myself.  Further review and
      cleanup by me.
      0e4611c0
Loading