Search Postgresql Archives

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

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

 



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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[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