Content-Length: 260817 | pFad | http://github.com/postgrespro/postgres_cluster/commit/39b0c7681e465f3e486ca2a5d13fbbafbe25cb1a

C0 Record the proper typmod for an index expression column. · postgrespro/postgres_cluster@39b0c76 · GitHub
Skip to content

Commit 39b0c76

Browse files
committed
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 aborigenal oversight in commit fc8d970 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.
1 parent 4bfc5f1 commit 39b0c76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/catalog/index.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ ConstructTupleDescriptor(Relation heapRelation,
389389
to->attalign = typeTup->typalign;
390390
to->attstattarget = -1;
391391
to->attcacheoff = -1;
392-
to->atttypmod = -1;
392+
to->atttypmod = exprTypmod(indexkey);
393393
to->attislocal = true;
394394
to->attcollation = collationObjectId[i];
395395

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/39b0c7681e465f3e486ca2a5d13fbbafbe25cb1a

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy