Re: index on a box

Поиск
Список
Период
Сортировка
Искать
От
Dustin Sallings
Тема
Re: index on a box
Дата
Msg-id
Pine.OSX.4.33.0106211608500.620-100000@dustinmobile
Ответ на
Список
Дерево обсуждения
index on a box Dustin Sallings <dustin@spy.net>
Re: index on a box Tom Lane <tgl@sss.pgh.pa.us>
Re: index on a box Dustin Sallings <dustin+postgres@spy.net>
Re: index on a box Tom Lane <tgl@sss.pgh.pa.us>
Re: index on a box Dustin Sallings <dustin+postgres@spy.net>
Re: index on a box Dustin Sallings <dustin+postgres@spy.net>
Re: index on a box Tom Lane <tgl@sss.pgh.pa.us>
Re: index on a box Dustin Sallings <dustin+postgres@spy.net>
Around 18:26 on Jun 21, 2001, Tom Lane said:

# You'd better declare the function as 'iscachable'.  As is, the planner
# doesn't trust it to return a constant.

	Got it!  Tried a few variations on the create until I got this:

create function box(point) returns box as
    'select box($1, $1)'
    language 'sql'
    with (iscachable);

misc=# explain select * from tmp where box(point(-121, 37)) @ b;
NOTICE:  QUERY PLAN:

Index Scan using tmp_bybox on tmp  (cost=0.00..238.59 rows=61 width=92)

	Thanks!  :)

	(oh, and would it be reasonable to list at least some of the
possible attributes in psql?)

--
SPY                      My girlfriend asked me which one I like better.
pub  1024/3CAE01D5 1994/11/03 Dustin Sallings 
|    Key fingerprint =  87 02 57 08 02 D0 DA D6  C8 0F 3E 65 51 98 D8 BE
L_______________________ I hope the answer won't upset her. ____________

В списке pgsql-general по дате отправления
От: Thalis A. Kalfigopoulos
Дата:
Сообщение: insightful article
От: Ana Carolina Alonso de Armiño
Дата:
Сообщение: postgres 7.1.2 with SuSE 7.1
FAQ