Re: Problem with create index

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Problem with create index
Дата
Msg-id 20031111002555.A47755@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Problem with create index  (Rajesh Kumar Mallah <mallah@trade-india.com>)
Ответы Re: Problem with create index  (Rajesh Kumar Mallah <mallah@trade-india.com>)
Список pgsql-general
On Tue, 11 Nov 2003, Rajesh Kumar Mallah wrote:

> Hmmm... am i doing anything really silly?

Functional indexes on 7.3 and earlier only allow a function over one or
more columns (which would disallow the below as a function over a function
over a column).  The usual workaround would be to make an immutable
function that does both functions on its argument something like:

create function lower_btrim(text) returns text as 'select
lower(btrim($1));' language 'sql' immutable;
create index profile_master2 on profile_master(lower_btrim(email));

In 7.4 I believe the below should work.

> tradein_clients=# CREATE INDEX profile_master2 on profile_master (lower( btrim(email) ) );
> ERROR:  parser: parse error at or near "(" at character 61

В списке pgsql-general по дате отправления:

Предыдущее
От: "Najib Abi Fadel"
Дата:
Сообщение: Re: SQL query not returning the value expected !!!!!!!!!!!!!!!!!!
Следующее
От: Ma Siva Kumar
Дата:
Сообщение: multibyte support