Convert name of array types to elem typoe followed by []

This commit is contained in:
eelke 2017-12-13 18:02:39 +01:00
parent 7fb4e1ddb9
commit b8505ce451
3 changed files with 54 additions and 45 deletions

View file

@ -56,7 +56,16 @@ QString getTypeDisplayString(const PgDatabaseCatalog &cat, Oid oid)
{
auto tc = cat.types();
auto t = tc->getByKey(oid);
return t.name;
QString s;
if (t.category == TypCategory::Array) {
auto et = tc->getByKey(t.elem);
s = et.name;
s += "[]";
}
else {
s = t.name;
}
return s;
}