• Marc G. Fournier's avatar
    This patch for Versions 1 and 2 corrects the following bug: · 61eaefe9
    Marc G. Fournier authored
    In a catalog class that has a "name" type attribute, UPDATEing of an
    instance of that class may destroy all of the attributes of that
    instance that are stored as or after the "name" attribute.
    
    This is caused by the alignment value of the "name" type being set to
    "double" in Class pg_type, but "integer" in Class pg_attribute.
    Postgres constructs a tuple using double alignment, but interprets it
    using integer alignment.
    
    The fix is to change the alignment to integer in pg_type.
    
    Note that this corrects the problem for new Postgres systems.  Existing
    databases already contain the error and it can't easily be repaired because
    this very bug prevents updating the class that contains it.
    
    --
    Bryan Henderson                                    Phone 408-227-6803
    San Jose, California
    61eaefe9
pg_attribute.h 30.4 KB