Re: Disallow unique index on system columns

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Disallow unique index on system columns
Date: 2016-04-15 15:49:27
Message-ID: 27352.1460735367@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> writes:
> On 15 April 2016 at 13:43, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> wrote:
>> The attached patch just disallows any index containing a system
>> column, apart from OID.

> Seems I only did half the job as I forgot to think to check for system
> columns that are hidden away inside expressions or predicates.
> The attached fixes that.

I think what we should do with this is split it into two patches, one
to fix ALTER REPLICA IDENTITY's crash (which we'd back-patch to 9.4)
and one to forbid indexes on system columns (which IMO should be HEAD
only). The first of those should be pretty uncontroversial, so I'll
go ahead with pushing it --- anyone have a problem with the second?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-04-15 15:52:05 Unreasonably generic names in matview.sql
Previous Message Michael Paquier 2016-04-15 12:46:04 Re: Optimization for updating foreign tables in Postgres FDW