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
    In commit 9e3ad1aa I modified plpgsql
    to use exec_stmt_return's simple-variables fast path in more cases.
    However, I overlooked that there are really two different return
    conventions in use here, depending on whether estate->retistuple is true,
    and the existing fast-path code had only bothered to handle one of them.
    So trying to return a scalar in a function returning composite, or vice
    versa, could lead to unexpected error messages (typically "cache lookup
    failed for type 0") or to a null-pointer-dereference crash.
    
    In the DTYPE_VAR case, we can just throw error if retistuple is true,
    corresponding to what happens in the general-expression code path that was
    being used previously.  (Perhaps someday both of these code paths should
    attempt a coercion, but today is not that day.)
    
    In the REC and ROW cases, just hand the problem to exec_eval_datum()
    when not retistuple.  Also clean up the ROW coding slightly so it looks
    more like exec_eval_datum().
    
    The previous commit also caused exec_stmt_return_next() to be used in
    more cases, but that code seems to be OK as-is.
    
    Per off-list report from Serge Rielau.  This bug is new in 9.5 so no need
    to back-patch.
    ae58f143
    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.  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/.