is this the correct result for ts_rewrite? reducing tsquery to improve performance?

Поиск
Список
Период
Сортировка
От Ivan Sergio Borgonovo
Тема is this the correct result for ts_rewrite? reducing tsquery to improve performance?
Дата
Msg-id 20100129021404.279bbfe2@dawn.webthatworks.it
обсуждение исходный текст
Список pgsql-general
select ts_rewrite(
  to_tsquery('java:A & cola & java:AB'),
  'java:AB'::tsquery,
  'java:AB'::tsquery);

ts_rewrite
--------------------------------
 'cola' & 'java':AB & 'java':AB

Is this the expected (documented) result?

I found this while looking for a way to build up a tsquery directly
in it's own structure without passing through its text
representation (and maybe reduce it).

The following looks equivalent. Are they?

test=# select 'java:ABC'::tsquery;
  tsquery
------------
 'java':ABC
(1 row)

test=# select 'java:A | java:B | java:C'::tsquery;
              tsquery
------------------------------------
 ( 'java':A | 'java':B ) | 'java':C
(1 row)

I did try to pass them through nodetree... but the result keeps on
being different.

--
Ivan Sergio Borgonovo
http://www.webthatworks.it


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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: how to update a view from a table
Следующее
От: 沈雷
Дата:
Сообщение: Output float number with hex format