getTypeDisplayString now better handles zero oid's and oid's that are not known in the catalog.
Close #10
This commit is contained in:
parent
51d72c7f20
commit
65c3d9f2b4
1 changed files with 7 additions and 0 deletions
|
|
@ -75,8 +75,15 @@ QString getTablespaceDisplayString(const PgDatabaseCatalog &cat, Oid oid)
|
|||
|
||||
QString getTypeDisplayString(const PgDatabaseCatalog &cat, Oid oid, int32_t typmod)
|
||||
{
|
||||
if (oid == 0) {
|
||||
return QString();
|
||||
}
|
||||
|
||||
auto tc = cat.types();
|
||||
auto t = tc->getByKey(oid);
|
||||
if (t.oid == InvalidOid) {
|
||||
return "(invalid/unknown)";
|
||||
}
|
||||
QString s;
|
||||
if (t.category == TypCategory::Array) {
|
||||
// auto et = tc->getByKey(t.elem);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue