Re: GiST support for inet datatypes - Mailing list pgsql-hackers

From Tom Lane
Subject Re: GiST support for inet datatypes
Date
Msg-id 31281.1392821576@sss.pgh.pa.us
Whole thread Raw
In response to Re: GiST support for inet datatypes  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: GiST support for inet datatypes  (Emre Hasegeli <emre@hasegeli.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Feb 17, 2014 at 3:56 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> We should probably expend some thought on a general approach to
>> replacing the default opclass for a datatype, because I'm sure this
>> will come up again.  Right now I don't see a feasible way.

> It seems odd for "default" to be a property of the opclass rather than
> a separate knob.  What comes to mind is something like:
> ALTER TYPE sniffle SET DEFAULT OPERATOR CLASS FOR btree TO achoo_ops;
> Not sure how much that helps.

Not at all, AFAICS.  If it were okay to decide that some formerly-default
opclass is no longer default, then having such a command would be better
than manually manipulating pg_opclass.opcdefault --- but extension upgrade
scripts could certainly do the latter if they had to.  The problem here
is whether it's upgrade-safe to make such a change at all; having
syntactic sugar doesn't make it safer.
        regards, tom lane



pgsql-hackers by date:

Previous
From: "MauMau"
Date:
Subject: Re: Do you know the reason for increased max latency due to xlog scaling?
Next
From: Tom Lane
Date:
Subject: Re: should we add a XLogRecPtr/LSN SQL type?