From 87553b2554439294ec973378059fbd9fdc2d9771 Mon Sep 17 00:00:00 2001 From: eelke Date: Thu, 15 Oct 2020 19:21:44 +0200 Subject: [PATCH] fix missing typmod in generated sql ie the max length of a varchar or the scale and precision of a numeric closes #66 --- pglablib/catalog/PgAttribute.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pglablib/catalog/PgAttribute.cpp b/pglablib/catalog/PgAttribute.cpp index 81b3d97..471f847 100644 --- a/pglablib/catalog/PgAttribute.cpp +++ b/pglablib/catalog/PgAttribute.cpp @@ -21,8 +21,7 @@ QString PgAttribute::columnDefinition(const PgDatabaseCatalog &cat) const type_str = "BIGSERIAL"; } else { - auto&& type = cat.types()->getByKey(typid); - type_str = type->objectName(); + type_str = getTypeDisplayString(cat, typid, typmod); } QString sql = quoteIdent(name) % " " % type_str;