Re: Best way to use indexes for partial match at

Поиск
Список
Период
Сортировка
От Andrus
Тема Re: Best way to use indexes for partial match at
Дата
Msg-id dl1oe2$1578$1@news.hub.org
обсуждение исходный текст
Ответ на Best way to use indexes for partial match at beginning  ("Andrus Moor" <eetasoft@online.ee>)
Ответы Re: Best way to use indexes for partial match at  (Martijn van Oosterhout <kleptog@svana.org>)
Re: Best way to use indexes for partial match at  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
> Ya know, this brings up an interesting question, would it be feasible to
> allow for a function of somekind to be applied as an argument to a
> primary key declaration?  It would certainly be useful for character
> type pks in non-C locales.

Using this would require making non-standard changes to ddl statements and
thus is not good.

Best solution is as follows:

Planner must use index

CREATE TABLE foo ( bar CHAR(10) PRIMARY KEY );

for queries like

SELECT * FROM foo WHERE bar::CHAR(3)='ABC';

Can you make this patch or add this to todo list  ?

Andrus.



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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Two slightly different queries produce same results,
Следующее
От: Guido Neitzer
Дата:
Сообщение: Re: Ordering and unicode