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
    If the bitstring length is not a multiple of 8, we'd shift the
    rightmost bits into the pad space, which must be zeroes --- bit_cmp,
    for one, depends on that.  This'd lead to the result failing to
    compare equal to what it should compare equal to, as reported in
    bug #16013 from Daryl Waycott.
    
    This is, if memory serves, not the first such bug in the bitstring
    functions.  In hopes of making it the last one, do a bit more work
    than minimally necessary to fix the bug:
    
    * Add assertion checks to bit_out() and varbit_out() to complain if
    they are given incorrectly-padded input.  This will improve the
    odds that manual testing of any new patch finds problems.
    
    * Encapsulate the padding-related logic in macros to make it
    easier to use.
    
    Also, remove unnecessary padding logic from bit_or() and bitxor().
    Somebody had already noted that we need not re-pad the result of
    bit_and() since the inputs are required to be the same length,
    but failed to extrapolate that to the other two.
    
    Also, move a comment block that once was near the head of varbit.c
    (but people kept putting other stuff in front of it), to put it in
    the header block.
    
    Note for the release notes: if anyone has inconsistent data as a
    result of saving the output of bitshiftright() in a table, it's
    possible to fix it with something like
    UPDATE mytab SET bitcol = ~(~bitcol) WHERE bitcol != ~(~bitcol);
    
    This has been broken since day one, so back-patch to all supported
    branches.
    
    Discussion: https://postgr.es/m/16013-c2765b6996aacae9@postgresql.org
    5ac0d936
    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:
    
    	https://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
    https://www.postgresql.org/download/.  For more information look at our
    web site located at https://www.postgresql.org/.