Thread

  1. Support for Physical Column Reordering in PG

    Srinath Reddy Sadipiralla <srinath2133@gmail.com> — 2025-05-18T17:26:54Z

    Hi,is there any better way to change the order of a column except
    1) creating a new table and do insert with select with rearranged columns
    2) using views
    
    use case:
    there are cases where we might be using delta compression between tuples we
    have a table like
    "create table temp(x bigint,y char(3),z integer);"
    If we have tuple values,for the column y less than 3, SQL standard does
    padding to make the length = 3,which causes delta noise,so to reduce this
    noise we reposition the column y at the end ,which helps us to reduce the
    delta between tuples.
    
    So is making a patch to have a sql command to reposition the column like
    other databases makes sense? thoughts ?
    
    -- 
    Thanks,
    Srinath Reddy Sadipiralla
    EDB: https://www.enterprisedb.com/