Re: pg_get_INDEXdef - opclass - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_get_INDEXdef - opclass
Date
Msg-id 19921.1150206111@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_get_INDEXdef - opclass  ("Dave Page" <dpage@vale-housing.co.uk>)
List pgsql-hackers
"Dave Page" <dpage@vale-housing.co.uk> writes:
> Right, but how can I conditionally join with pg_opclass based on whether
> or not the opclass specified for the column is the default for that
> type?

Check pg_opclass.opcdefault and compare pg_opclass.opcintype to the
index column's datatype (which you'd get from its pg_attribute row
... whether it's an expression is irrelevant).
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Luke Lonergan"
Date:
Subject: Re: Running a query twice to ensure cached results.
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] Non-transactional pg_class, try 2