Re: Why do we allow indexes to contain the same column more than once?

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why do we allow indexes to contain the same column more than once?
Date: 2014-05-01 13:11:31
Message-ID: 20140501131131.GA14243@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-05-01 13:47:00 Re: improving \dt++ in psql
Previous Message Greg Stark 2014-05-01 12:55:46 Why do we allow indexes to contain the same column more than once?