pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Thomas Kellerer <spam_eater@gmx.net>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: getIndexInfo() not returning operator classes
Date: Thu, 10 Nov 2005 13:39:02 -0500 (EST)
Message-ID: <Pine.BSO.4.61.0511101320340.18952@leary.csoft.net> (raw)
In-Reply-To: <dl020t$njm$1@sea.gmane.org>
References: <dku3nu$8k2$1@sea.gmane.org>
	<Pine.BSO.4.61.0511100152300.25311@leary.csoft.net>
	<dl0033$hng$1@sea.gmane.org>
	<Pine.BSO.4.61.0511101246080.3752@leary.csoft.net>
	<dl020t$njm$1@sea.gmane.org>



On Thu, 10 Nov 2005, Thomas Kellerer wrote:

> Sorry, I meant COLUMN_NAME (internally I'm collecting all values from 
> COLUMN_NAME into a field definition, that's where the error comes from).
>

Are you sure you want to be using getIndexInfo for this instead of 
something more pg specific like the pg_get_indexdef function?

Aside from this very specific problem (overlapping indexes with different 
opclasses), I don't think I'd ever want to see the opclass in the column 
name.  Certainly not if I was using the default opclass, and probably not 
if I was using a non-default opclass, but that was the only index on that 
column.

> That column will e.g. contain something like "lower(name)" for a 
> function based index, so I don't see a reason why it couldn't contain 
> "bar varchar_pattern_ops" In both cases it's not the column's name any 
> longer
>

In the function case the indexed data is not the column data, so putting 
the column's name is misleading.  In the opclass case the indexed data is 
really the column's data so the column name is accurate.  The fact that 
it is indexed differently for different operations upon it is not terribly 
relevent to the column name at least.

I personally don't think adding opclass to the column_name is a good idea, 
but you're welcome to try and sway me with a convincing argument or 
popular support.

Kris Jurka



view thread (8+ messages)  latest in thread

Message-ID: <Pine.BSO.4.61.0511101320340.18952@leary.csoft.net>
Permalink:  ../Pine.BSO.4.61.0511101320340.18952@leary.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.61.0511101320340.18952@leary.csoft.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: books@ejurka.com, spam_eater@gmx.net
  Subject: Re: getIndexInfo() not returning operator classes
  In-Reply-To: <Pine.BSO.4.61.0511101320340.18952@leary.csoft.net>
  References: <dku3nu$8k2$1@sea.gmane.org> <Pine.BSO.4.61.0511100152300.25311@leary.csoft.net> <dl0033$hng$1@sea.gmane.org> <Pine.BSO.4.61.0511101246080.3752@leary.csoft.net> <dl020t$njm$1@sea.gmane.org> <Pine.BSO.4.61.0511101320340.18952@leary.csoft.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox