Support expressions as partitioning keys

This commit is contained in:
eelke 2023-03-21 16:20:25 +01:00
parent 2c899bd799
commit 3cc28231f9
2 changed files with 9 additions and 7 deletions

View file

@ -292,7 +292,7 @@ QString PgClass::partitionKeyItemSql(
) const
{
if (keyItem.attNum == 0)
return "\"<expr>\""; // TODO add expression support for now use this to prevent a crash here because column 0 does not exist
return keyItem.expression;
const PgAttribute *col = catalog().attributes()->findIf(
[this, &keyItem] (const auto &att)