Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

postgres-lambda-diff

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Tom Lane authored
    This patch gets rid of the concept of, and infrastructure for,
    non-canonical PathKeys; we now only ever create canonical pathkey lists.
    
    The need for non-canonical pathkeys came from the desire to have
    grouping_planner initialize query_pathkeys and related pathkey lists before
    calling query_planner.  However, since query_planner didn't actually *do*
    anything with those lists before they'd been made canonical, we can get rid
    of the whole mess by just not creating the lists at all until the point
    where we formerly canonicalized them.
    
    There are several ways in which we could implement that without making
    query_planner itself deal with grouping/sorting features (which are
    supposed to be the province of grouping_planner).  I chose to add a
    callback function to query_planner's API; other alternatives would have
    required adding more fields to PlannerInfo, which while not bad in itself
    would create an ABI break for planner-related plugins in the 9.2 release
    series.  This still breaks ABI for anything that calls query_planner
    directly, but it seems somewhat unlikely that there are any such plugins.
    
    I had originally conceived of this change as merely a step on the way to
    fixing bug #8049 from Teun Hoogendoorn; but it turns out that this fixes
    that bug all by itself, as per the added regression test.  The reason is
    that now get_eclass_for_sort_expr is adding the ORDER BY expression at the
    end of EquivalenceClass creation not the start, and so anything that is in
    a multi-member EquivalenceClass has already been created with correct
    em_nullable_relids.  I am suspicious that there are related scenarios in
    which we still need to teach get_eclass_for_sort_expr to compute correct
    nullable_relids, but am not eager to risk destabilizing either 9.2 or 9.3
    to fix bugs that are only hypothetical.  So for the moment, do this and
    stop here.
    
    Back-patch to 9.2 but not to earlier branches, since they don't exhibit
    this bug for lack of join-clause-movement logic that depends on
    em_nullable_relids being correct.  (We might have to revisit that choice
    if any related bugs turn up.)  In 9.2, don't change the signature of
    make_pathkeys_for_sortclauses nor remove canonicalize_pathkeys, so as
    not to risk more plugin breakage than we have to.
    db9f0e1d
    History
    PostgreSQL Database Management System
    =====================================
    
    This directory contains the source code distribution of the PostgreSQL
    database management system.
    
    PostgreSQL is an advanced object-relational database management system
    that supports an extended subset of the SQL standard, including
    transactions, foreign keys, subqueries, triggers, user-defined types
    and functions.  This distribution also contains C language bindings.
    
    PostgreSQL has many language interfaces, many of which are listed here:
    
    	http://www.postgresql.org/download
    
    See the file INSTALL for instructions on how to build and install
    PostgreSQL.  That file also lists supported operating systems and
    hardware platforms and contains information regarding any other
    software packages that are required to build or run the PostgreSQL
    system.  Changes between all PostgreSQL releases are recorded in the
    file HISTORY.  Copyright and license information can be found in the
    file COPYRIGHT.  A comprehensive documentation set is included in this
    distribution; it can be read as described in the installation
    instructions.
    
    The latest version of this software may be obtained at
    http://www.postgresql.org/download/.  For more information look at our
    web site located at http://www.postgresql.org/.