From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane) |
Cc: | bryan(at)arcamax(dot)com, pgsql-sql(at)hub(dot)org, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Re: [SQL] Functional Indexes |
Date: | 1999-03-15 14:53:15 |
Message-ID: | 199903151453.JAA12863@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-sql |
On the TODO list:
* allow creation of functional indexes to use default types
> "Bryan White" <bryan(at)arcamax(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 1999-03-15 14:58:09 | Re: [HACKERS] Odd behavior of type coercion for datetime |
Previous Message | Bruce Momjian | 1999-03-15 14:52:13 | Re: [HACKERS] char(n) default '' crashes server |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 1999-03-15 15:09:08 | Re: [SQL] install problem |
Previous Message | Vikrant Rathore | 1999-03-15 09:19:44 | Mail about FOREIGN KEY |