Re: Why do we allow indexes to contain the same column more than once? - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Why do we allow indexes to contain the same column more than once?
Date
Msg-id 20140501131131.GA14243@awork2.anarazel.de
Whole thread Raw
In response to Why do we allow indexes to contain the same column more than once?  (Greg Stark <stark@mit.edu>)
Responses Re: Why do we allow indexes to contain the same column more than once?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

On 2014-05-01 13:55:46 +0100, Greg Stark wrote:
> Is there some use case for that I'm not seeing?
> 
> postgres=***# create index tti on
> tt(i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i);
> CREATE INDEX
> Time: 15.891 ms

Can be useful if different opclasses are used for the individual
columns. Other than that I am not seing much use.
But what would we gain by prohibiting it except possibly breaking
people's upgrades?

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Why do we allow indexes to contain the same column more than once?
Next
From: Tom Lane
Date:
Subject: Re: improving \dt++ in psql