Ticket #1: patch.diff

File patch.diff, 5.7 KB (added by dpage, 3 years ago)

Patch

  • pgadmin/include/schema/pgTable.h

     
    105105    void iSetCompressLevel(const wxString& s) { compressLevel = s; } 
    106106    wxString GetIsColumnStore() { return columnstore; } 
    107107    void iSetIsColumnStore(const wxString& s) { columnstore = s; } 
     108    wxString GetCompressType() { return compresstype; } 
     109    void iSetCompressType(const wxString& s) { compresstype = s; }; 
     110    wxString GetBlocksize() { return blocksize; } 
     111    void iSetBlocksize(const wxString& s) { blocksize = s; }; 
     112    wxString GetChecksum() { return checksum; } 
     113    void iSetChecksum(const wxString& s) { checksum = s; }; 
    108114    wxString GetPartitionDef() { return partitionDef; } 
    109115    void iSetPartitionDef(const wxString& s) { partitionDef = s; } 
    110116    bool GetIsPartitioned() const { return isPartitioned || partitionDef.Length() > 0; } 
     
    204210    wxString appendOnly; 
    205211    wxString compressLevel; 
    206212    wxString columnstore; 
     213    wxString compresstype; 
     214    wxString blocksize; 
     215    wxString checksum; 
    207216    wxString partitionDef; 
    208217    bool isPartitioned; 
    209218    bool hasOids, hasSubclass, rowsCounted, isReplicated, showExtendedStatistics, distributionIsRandom; 
  • pgadmin/schema/gpPartition.cpp

     
    110110        query += wxT(", substring(array_to_string(reloptions, ',') from 'appendonly=([a-z]*)') AS appendonly \n"); 
    111111        query += wxT(", substring(array_to_string(reloptions, ',') from 'compresslevel=([0-9]*)') AS compresslevel \n"); 
    112112    query += wxT(", substring(array_to_string(reloptions, ',') from 'columnstore=([a-z]*)') AS columnstore \n"); 
     113    query += wxT(", substring(array_to_string(reloptions, ',') from 'compresstype=([a-z0-9]*)') AS compresstype \n"); 
     114    query += wxT(", substring(array_to_string(reloptions, ',') from 'blocksize=([0-9]*)') AS blocksize \n"); 
     115    query += wxT(", substring(array_to_string(reloptions, ',') from 'checksum=([a-z]*)') AS checksum \n"); 
    113116        //query += wxT(", rel.oid in (select parrelid from pg_partition) as ispartitioned\n"); // This only works for top-level tables, not intermediate ones 
    114117        // This looks for intermediate partitions that have subpartitions 
    115118        query += wxT(", rel.oid in (select pr.parchildrelid from pg_partition_rule pr, pg_partition pp where pr.paroid = pp.oid and pp.parlevel < (select max(parlevel) from pg_partition where parrelid = pp.parrelid)) as ispartitioned \n"); 
     
    170173                        table->iSetAppendOnly(tables->GetVal(wxT("appendonly"))); 
    171174                        table->iSetCompressLevel(tables->GetVal(wxT("compresslevel"))); 
    172175            table->iSetIsColumnStore(tables->GetVal(wxT("columnstore"))); 
     176            table->iSetCompressType(tables->GetVal(wxT("compresstype"))); 
     177            table->iSetBlocksize(tables->GetVal(wxT("blocksize"))); 
     178            table->iSetChecksum(tables->GetVal(wxT("checksum"))); 
    173179 
    174180                        table->iSetPartitionDef(wxT("")); 
    175181                        table->iSetIsPartitioned(tables->GetBool(wxT("ispartitioned")));  
  • pgadmin/schema/pgTable.cpp

     
    350350                sql += wxT("COMPRESSLEVEL=") + GetCompressLevel() + wxT(", "); 
    351351            if (GetIsColumnStore().Length() > 0) 
    352352                sql += wxT("COLUMNSTORE=") + GetIsColumnStore() + wxT(", "); 
     353            if (GetCompressType().Length() > 0) 
     354                sql += wxT("COMPRESSTYPE=") + GetCompressType() + wxT(", "); 
     355            if (GetBlocksize().Length() > 0) 
     356                sql += wxT("BLOCKSIZE=") + GetBlocksize() + wxT(", "); 
     357            if (GetChecksum().Length() > 0) 
     358                sql += wxT("CHECKSUM=") + GetChecksum() + wxT(", "); 
    353359            if (GetHasOids()) 
    354360                sql +=  wxT("\n  OIDS=TRUE"); 
    355361            else 
     
    12051211            query += wxT(", substring(array_to_string(rel.reloptions, ',') from 'appendonly=([a-z]*)') AS appendonly \n"); 
    12061212            query += wxT(", substring(array_to_string(rel.reloptions, ',') from 'compresslevel=([0-9]*)') AS compresslevel \n"); 
    12071213            query += wxT(", substring(array_to_string(rel.reloptions, ',') from 'columnstore=([a-z]*)') AS columnstore \n"); 
     1214            query += wxT(", substring(array_to_string(rel.reloptions, ',') from 'compresstype=([a-z0-9]*)') AS compresstype \n"); 
     1215            query += wxT(", substring(array_to_string(reloptions, ',') from 'blocksize=([0-9]*)') AS blocksize \n"); 
     1216            query += wxT(", substring(array_to_string(reloptions, ',') from 'checksum=([a-z]*)') AS checksum \n"); 
    12081217            if (collection->GetConnection()->GetIsGreenplum() && collection->GetConnection()->BackendMinimumVersion(8, 2, 9)) 
    12091218                query += wxT(", rel.oid in (select parrelid from pg_partition) as ispartitioned\n"); 
    12101219        } 
     
    13711380                table->iSetAppendOnly(tables->GetVal(wxT("appendonly"))); 
    13721381                table->iSetCompressLevel(tables->GetVal(wxT("compresslevel"))); 
    13731382                table->iSetIsColumnStore(tables->GetVal(wxT("columnstore"))); 
     1383                table->iSetCompressType(tables->GetVal(wxT("compresstype"))); 
     1384                table->iSetBlocksize(tables->GetVal(wxT("blocksize"))); 
     1385                table->iSetChecksum(tables->GetVal(wxT("checksum"))); 
    13741386 
    13751387                table->iSetPartitionDef(wxT("")); 
    13761388                table->iSetIsPartitioned(false);