mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-07 19:47:50 +08:00
Record the proper typmod for an index expression column.
We should use exprTypmod() to extract the typmod of the expression,
instead of just blindly storing -1. This seems to have been an aboriginal
oversight in commit fc8d970cbc
which
introduced general-expression indexes. The consequences are only cosmetic
at present, since the index machinery doesn't really look at typmod for
index columns; but still it seems best to describe the column type as
precisely as we can. Per off-list complaint from Thomas Fanghaenel.
This commit is contained in:
parent
4bfc5f1396
commit
39b0c7681e
@ -389,7 +389,7 @@ ConstructTupleDescriptor(Relation heapRelation,
|
|||||||
to->attalign = typeTup->typalign;
|
to->attalign = typeTup->typalign;
|
||||||
to->attstattarget = -1;
|
to->attstattarget = -1;
|
||||||
to->attcacheoff = -1;
|
to->attcacheoff = -1;
|
||||||
to->atttypmod = -1;
|
to->atttypmod = exprTypmod(indexkey);
|
||||||
to->attislocal = true;
|
to->attislocal = true;
|
||||||
to->attcollation = collationObjectId[i];
|
to->attcollation = collationObjectId[i];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user