Re: Operator families vs. casts - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Operator families vs. casts
Date
Msg-id 5647.1306246234@sss.pgh.pa.us
Whole thread Raw
In response to Operator families vs. casts  (Noah Misch <noah@leadboat.com>)
Responses Re: Operator families vs. casts  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
Noah Misch <noah@leadboat.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.  I think that example may destroy the rest of your argument.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: Reducing overhead of frequent table locks
Next
From: Noah Misch
Date:
Subject: Re: Operator families vs. casts