pgsql: Record the proper typmod for an index expression column.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Record the proper typmod for an index expression column.
Date: 2014-04-26 16:22:16
Message-ID: E1We5Mm-0006nC-AH@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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 fc8d970cbcdd6f025475822a4cf01dfda0873226 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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/39b0c7681e465f3e486ca2a5d13fbbafbe25cb1a

Modified Files
--------------
src/backend/catalog/index.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-04-26 18:14:37 pgsql: Don't #include utils/palloc.h in common/fe_memutils.h.
Previous Message Tom Lane 2014-04-25 20:00:02 pgsql: Fix off-by-one bug in LWLockRegisterTranche().