pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <maillist@candle.pha.pa.us>
To: tgl@sss.pgh.pa.us
Cc: bryan@arcamax.com
Cc: pgsql-sql@hub.org
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Re: [SQL] Functional Indexes
Date: Mon, 15 Mar 1999 09:53:15 -0500 (EST)
Message-ID: <199903151453.JAA12863@candle.pha.pa.us> (raw)
In-Reply-To: <20086.918322067@sss.pgh.pa.us>

On the TODO list:

	* allow creation of functional indexes to use default types


> "Bryan White" <bryan@arcamax.com> writes:
> > The documentation for CREATE INDEX implies that functions are allowed in
> > index definitions but when I execute:
> > create unique index idxtest on customer (lower(email));
> > the result is:
> > ERROR:  DefineIndex: (null) class not found
> > Should this work?  Do I have the syntax wrong?
> 
> I tried this wih 6.4.2 and found that it was only accepted if I
> explicitly identified which index operator class to use:
> 
> play=> create table customer (email text);
> CREATE
> play=> create unique index idxtest on customer (lower(email));
> ERROR:  DefineIndex:  class not found
> play=> create unique index idxtest on customer (lower(email) text_ops);
> CREATE
> play=>
> 
> That'll do as a workaround for Bryan, but isn't this a bug?  Surely
> the system ought to know what type the result of lower() is...
> 
> 			regards, tom lane
> 
> 


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



view thread (13+ messages)  latest in thread

Message-ID: <199903151453.JAA12863@candle.pha.pa.us>
Permalink:  ../199903151453.JAA12863@candle.pha.pa.us/
Also on:    postgresql.org/message-id/199903151453.JAA12863@candle.pha.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: maillist@candle.pha.pa.us, tgl@sss.pgh.pa.us, bryan@arcamax.com, pgsql-sql@hub.org, pgsql-hackers@postgreSQL.org
  Subject: Re: [HACKERS] Re: [SQL] Functional Indexes
  In-Reply-To: <199903151453.JAA12863@candle.pha.pa.us>

* 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