From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: Expression indexes ignore typmod of expression |
Date: | 2014-04-25 21:17:10 |
Message-ID: | 20140425211710.GD12174@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2014-04-25 17:05:26 -0400, Tom Lane wrote:
> A Salesforce colleague asked me why, for something like
> ....
> the index column ends up as "bpchar" and not "char(15)". The CASE
> expression does get resolved as char(15), but it turns out that
> index.c just ignores that.
I've seen that before but never looked what's the origin. +1 for fixing
it.
> I think this is just a hangover from
> before we paid much attention to expression typmods at all, and
> propose the attached patch.
>
> Comments?
Any chance it could cause problems with stored trees being different
from newly generated ones due to it? I.e. is it something that can be
done without a catversion bump?
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-04-25 21:19:00 | Re: Expression indexes ignore typmod of expression |
Previous Message | Tomas Vondra | 2014-04-25 21:16:01 | Re: [GENERAL] aggregate returning anyarray and 'cannot determine result data type' |