void iSetCompressLevel(const wxString& s) { compressLevel = s; }
wxString GetIsColumnStore() { return columnstore; }
void iSetIsColumnStore(const wxString& s) { columnstore = s; }
+ wxString GetCompressType() { return compresstype; }
+ void iSetCompressType(const wxString& s) { compresstype = s; };
+ wxString GetBlocksize() { return blocksize; }
+ void iSetBlocksize(const wxString& s) { blocksize = s; };
+ wxString GetChecksum() { return checksum; }
+ void iSetChecksum(const wxString& s) { checksum = s; };
wxString GetPartitionDef() { return partitionDef; }
void iSetPartitionDef(const wxString& s) { partitionDef = s; }
bool GetIsPartitioned() const { return isPartitioned || partitionDef.Length() > 0; }
wxString appendOnly;
wxString compressLevel;
wxString columnstore;
+ wxString compresstype;
+ wxString blocksize;
+ wxString checksum;
wxString partitionDef;
bool isPartitioned;
bool hasOids, hasSubclass, rowsCounted, isReplicated, showExtendedStatistics, distributionIsRandom;
query += wxT(", substring(array_to_string(reloptions, ',') from 'appendonly=([a-z]*)') AS appendonly \n");
query += wxT(", substring(array_to_string(reloptions, ',') from 'compresslevel=([0-9]*)') AS compresslevel \n");
query += wxT(", substring(array_to_string(reloptions, ',') from 'columnstore=([a-z]*)') AS columnstore \n");
+ query += wxT(", substring(array_to_string(reloptions, ',') from 'compresstype=([a-z0-9]*)') AS compresstype \n");
+ query += wxT(", substring(array_to_string(reloptions, ',') from 'blocksize=([0-9]*)') AS blocksize \n");
+ query += wxT(", substring(array_to_string(reloptions, ',') from 'checksum=([a-z]*)') AS checksum \n");
//query += wxT(", rel.oid in (select parrelid from pg_partition) as ispartitioned\n"); // This only works for top-level tables, not intermediate ones
// This looks for intermediate partitions that have subpartitions
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");
table->iSetAppendOnly(tables->GetVal(wxT("appendonly")));
table->iSetCompressLevel(tables->GetVal(wxT("compresslevel")));
table->iSetIsColumnStore(tables->GetVal(wxT("columnstore")));
+ table->iSetCompressType(tables->GetVal(wxT("compresstype")));
+ table->iSetBlocksize(tables->GetVal(wxT("blocksize")));
+ table->iSetChecksum(tables->GetVal(wxT("checksum")));
table->iSetPartitionDef(wxT(""));
table->iSetIsPartitioned(tables->GetBool(wxT("ispartitioned")));
sql += wxT("COMPRESSLEVEL=") + GetCompressLevel() + wxT(", ");
if (GetIsColumnStore().Length() > 0)
sql += wxT("COLUMNSTORE=") + GetIsColumnStore() + wxT(", ");
+ if (GetCompressType().Length() > 0)
+ sql += wxT("COMPRESSTYPE=") + GetCompressType() + wxT(", ");
+ if (GetBlocksize().Length() > 0)
+ sql += wxT("BLOCKSIZE=") + GetBlocksize() + wxT(", ");
+ if (GetChecksum().Length() > 0)
+ sql += wxT("CHECKSUM=") + GetChecksum() + wxT(", ");
if (GetHasOids())
sql += wxT("\n OIDS=TRUE");
else
query += wxT(", substring(array_to_string(rel.reloptions, ',') from 'appendonly=([a-z]*)') AS appendonly \n");
query += wxT(", substring(array_to_string(rel.reloptions, ',') from 'compresslevel=([0-9]*)') AS compresslevel \n");
query += wxT(", substring(array_to_string(rel.reloptions, ',') from 'columnstore=([a-z]*)') AS columnstore \n");
+ query += wxT(", substring(array_to_string(rel.reloptions, ',') from 'compresstype=([a-z0-9]*)') AS compresstype \n");
+ query += wxT(", substring(array_to_string(reloptions, ',') from 'blocksize=([0-9]*)') AS blocksize \n");
+ query += wxT(", substring(array_to_string(reloptions, ',') from 'checksum=([a-z]*)') AS checksum \n");
if (collection->GetConnection()->GetIsGreenplum() && collection->GetConnection()->BackendMinimumVersion(8, 2, 9))
query += wxT(", rel.oid in (select parrelid from pg_partition) as ispartitioned\n");
}
table->iSetAppendOnly(tables->GetVal(wxT("appendonly")));
table->iSetCompressLevel(tables->GetVal(wxT("compresslevel")));
table->iSetIsColumnStore(tables->GetVal(wxT("columnstore")));
+ table->iSetCompressType(tables->GetVal(wxT("compresstype")));
+ table->iSetBlocksize(tables->GetVal(wxT("blocksize")));
+ table->iSetChecksum(tables->GetVal(wxT("checksum")));
table->iSetPartitionDef(wxT(""));
table->iSetIsPartitioned(false);