Re: pg_get_INDEXdef - opclass

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

> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: 13 June 2006 14:42
> To: Dave Page
> Cc: pgsql-hackers(at)postgresql(dot)org
> Subject: Re: [HACKERS] pg_get_INDEXdef - opclass
>
> "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).

Ahh right - thanks. I got it into my head that there was no pg_attribute
row for an expression. Must be the sun...

Regards, Dave.

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2006-06-13 14:52:38 Re: CSV mode option for pg_dump
Previous Message Volkan YAZICI 2006-06-13 14:44:19 Re: CSV mode option for pg_dump