| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Michael Fuhr <mike(at)fuhr(dot)org> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Expression index ignores column statistics target |
| Date: | 2005-10-01 17:16:38 |
| Message-ID: | 9372.1128186998@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Michael Fuhr <mike(at)fuhr(dot)org> writes:
> ALTER INDEX indexname ALTER COLUMN "the expression" SET STATISTICS 100;
Yeah, that could probably be made to work.
> I do see that indexes allow multiple instances of the same expression,
> so this approach could be ambiguous.
I can't think of an actual use for that, though, so we could just ignore
the possible ambiguity. Or we could have the ALTER update all columns
matching the given expression.
> test=> CREATE INDEX foo1_idx ON foo (x, x);
> ERROR: duplicate key violates unique constraint "pg_attribute_relid_attnam_index"
Hmm, seems like there should be a more direct check for this ...
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ron Peacetree | 2005-10-01 17:42:32 | Re: [HACKERS] A Better External Sort? |
| Previous Message | Tom Lane | 2005-10-01 17:13:49 | Re: FW: PGBuildfarm member snake Branch HEAD Status changed |