Search Postgresql Archives

Re: Unique constraint or index, case insensitive, on multiple

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




>Tom Lane <tgl@xxxxxxxxxxxxx> wrote on 04/06/2006 11:33:57 AM:
> MargaretGillon@xxxxxxxxxxxxxx writes:
> > CREATE UNIQUE INDEX resource_refullname
> >  ON resource  USING btree  (redtid, (upper(refullname) text_ops));
>
> You need something newer than PG 7.3 to do that.  7.3 can't handle
> functional indexes with more than one column.  There are many other good
> reasons to upgrade anyway.
>
> BTW the correct syntax would be
>
> CREATE UNIQUE INDEX resource_refullname
>  ON resource  USING btree  (redtid, (upper(refullname)) text_ops);
>
> If you're going to put an opclass name, it goes outside the parens.
> (The only reason the parens are required at all is to separate the
> _expression_ from the opclass name ...)
>
>          regards, tom lane

I thought it might be version related. I had planned to upgrade soon and this is another good motivator.
Thank you,
Margaret Gillon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux