X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DB09AD7B75 for ; Thu, 10 Nov 2005 14:36:39 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88807-03 for ; Thu, 10 Nov 2005 18:36:37 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id D274BD7115 for ; Thu, 10 Nov 2005 14:36:36 -0400 (AST) Received: (qmail 7776 invoked by uid 1112); 10 Nov 2005 18:39:02 -0000 Date: Thu, 10 Nov 2005 13:39:02 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Thomas Kellerer Cc: pgsql-jdbc@postgresql.org Subject: Re: getIndexInfo() not returning operator classes In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.008 required=5 tests=[AWL=0.008] X-Spam-Score: 0.008 X-Spam-Level: X-Archive-Number: 200511/83 X-Sequence-Number: 14181 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