Ticket #1: patch.diff
| File patch.diff, 5.7 KB (added by dpage, 3 years ago) |
|---|
-
pgadmin/include/schema/pgTable.h
105 105 void iSetCompressLevel(const wxString& s) { compressLevel = s; } 106 106 wxString GetIsColumnStore() { return columnstore; } 107 107 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; }; 108 114 wxString GetPartitionDef() { return partitionDef; } 109 115 void iSetPartitionDef(const wxString& s) { partitionDef = s; } 110 116 bool GetIsPartitioned() const { return isPartitioned || partitionDef.Length() > 0; } … … 204 210 wxString appendOnly; 205 211 wxString compressLevel; 206 212 wxString columnstore; 213 wxString compresstype; 214 wxString blocksize; 215 wxString checksum; 207 216 wxString partitionDef; 208 217 bool isPartitioned; 209 218 bool hasOids, hasSubclass, rowsCounted, isReplicated, showExtendedStatistics, distributionIsRandom; -
pgadmin/schema/gpPartition.cpp
110 110 query += wxT(", substring(array_to_string(reloptions, ',') from 'appendonly=([a-z]*)') AS appendonly \n"); 111 111 query += wxT(", substring(array_to_string(reloptions, ',') from 'compresslevel=([0-9]*)') AS compresslevel \n"); 112 112 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"); 113 116 //query += wxT(", rel.oid in (select parrelid from pg_partition) as ispartitioned\n"); // This only works for top-level tables, not intermediate ones 114 117 // This looks for intermediate partitions that have subpartitions 115 118 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"); … … 170 173 table->iSetAppendOnly(tables->GetVal(wxT("appendonly"))); 171 174 table->iSetCompressLevel(tables->GetVal(wxT("compresslevel"))); 172 175 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"))); 173 179 174 180 table->iSetPartitionDef(wxT("")); 175 181 table->iSetIsPartitioned(tables->GetBool(wxT("ispartitioned"))); -
pgadmin/schema/pgTable.cpp
350 350 sql += wxT("COMPRESSLEVEL=") + GetCompressLevel() + wxT(", "); 351 351 if (GetIsColumnStore().Length() > 0) 352 352 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(", "); 353 359 if (GetHasOids()) 354 360 sql += wxT("\n OIDS=TRUE"); 355 361 else … … 1205 1211 query += wxT(", substring(array_to_string(rel.reloptions, ',') from 'appendonly=([a-z]*)') AS appendonly \n"); 1206 1212 query += wxT(", substring(array_to_string(rel.reloptions, ',') from 'compresslevel=([0-9]*)') AS compresslevel \n"); 1207 1213 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"); 1208 1217 if (collection->GetConnection()->GetIsGreenplum() && collection->GetConnection()->BackendMinimumVersion(8, 2, 9)) 1209 1218 query += wxT(", rel.oid in (select parrelid from pg_partition) as ispartitioned\n"); 1210 1219 } … … 1371 1380 table->iSetAppendOnly(tables->GetVal(wxT("appendonly"))); 1372 1381 table->iSetCompressLevel(tables->GetVal(wxT("compresslevel"))); 1373 1382 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"))); 1374 1386 1375 1387 table->iSetPartitionDef(wxT("")); 1376 1388 table->iSetIsPartitioned(false);
