Re: Operator families vs. casts

From: Noah Misch <noah(at)leadboat(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Operator families vs. casts
Date: 2011-05-24 14:26:59
Message-ID: 20110524142659.GB21833@tornado.gateway.2wire.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 24, 2011 at 10:10:34AM -0400, Tom Lane wrote:
> Noah Misch <noah(at)leadboat(dot)com> writes:
> > PostgreSQL 9.1 will implement ALTER TABLE ALTER TYPE operations that use a
> > binary coercion cast without rewriting the table or unrelated indexes. It
> > will always rewrite any indexes and recheck any foreign key constraints that
> > depend on a changing column. This is unnecessary for 100% of core binary
> > coercion casts. In my original design[1], I planned to detect this by
> > comparing the operator families of the old and would-be-new indexes. (This
> > still yields some unnecessary rewrites; oid_ops and int4_ops are actually
> > compatible, for example.)
>
> No, they aren't: signed and unsigned comparisons do not yield the same
> sort order.

True; scratch the parenthetical comment.

> I think that example may destroy the rest of your argument.

Not that I'm aware of.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message panam 2011-05-24 14:34:57 Re: Hash Anti Join performance degradation
Previous Message Tom Lane 2011-05-24 14:10:34 Re: Operator families vs. casts