Fix reading from catalog so that information about declarative partitioning is read correctly
(View and SQL generation still need fixes)
This commit is contained in:
parent
0cd019db92
commit
33319e3461
4 changed files with 43 additions and 12 deletions
|
|
@ -57,6 +57,14 @@ void operator<<(RelKind &s, const Pgsql::Value &v)
|
|||
case 'f':
|
||||
s = RelKind::ForeignTable;
|
||||
break;
|
||||
case 'p':
|
||||
s = RelKind::PartitionedTable;
|
||||
break;
|
||||
case 'I':
|
||||
s = RelKind::PartitionedIndex;
|
||||
break;
|
||||
default:
|
||||
throw std::runtime_error("Unknown RelKind");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -81,14 +89,16 @@ QString PgClass::typeName() const
|
|||
{
|
||||
switch (kind)
|
||||
{
|
||||
case RelKind::Table: return "TABLE";
|
||||
case RelKind::Index: return "INDEX";
|
||||
case RelKind::Sequence: return "SEQUENCE";
|
||||
case RelKind::View: return "VIEW";
|
||||
case RelKind::MaterializedView: return "MATERIALIZED VIEW";
|
||||
case RelKind::Composite: return "COMPOSITE";
|
||||
case RelKind::Toast: return "TOAST";
|
||||
case RelKind::ForeignTable: return "FOREIGN TABLE";
|
||||
case RelKind::Table: return "TABLE";
|
||||
case RelKind::Index: return "INDEX";
|
||||
case RelKind::Sequence: return "SEQUENCE";
|
||||
case RelKind::View: return "VIEW";
|
||||
case RelKind::MaterializedView: return "MATERIALIZED VIEW";
|
||||
case RelKind::Composite: return "COMPOSITE";
|
||||
case RelKind::Toast: return "TOAST";
|
||||
case RelKind::ForeignTable: return "FOREIGN TABLE";
|
||||
case RelKind::PartitionedTable: return "PARTITIONED TABLE";
|
||||
case RelKind::PartitionedIndex: return "PARTITIONED INDEX";
|
||||
}
|
||||
throw std::runtime_error("Unexpected value in PgClass::typeName()");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue