Re: pg_get_INDEXdef - opclass

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_get_INDEXdef - opclass
Date: 2006-06-13 13:41:51
Message-ID: 19921.1150206111@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Dave Page" <dpage(at)vale-housing(dot)co(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-06-13 14:02:10 Re: [PATCHES] Non-transactional pg_class, try 2
Previous Message Luke Lonergan 2006-06-13 13:14:56 Re: Running a query twice to ensure cached results.