ts_rewrite bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: ts_rewrite bug?
Date: 2007-10-18 02:34:13
Message-ID: 14780.1192674853@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hmm ... playing a bit more with the example I was just on about:

regression=# create table ts_subst(target tsquery, subst tsquery);
CREATE TABLE
regression=# insert into ts_subst values('a', 'foo|bar');
INSERT 0 1
regression=# insert into ts_subst values('bar', 'baz');
INSERT 0 1
regression=# select ts_rewrite('a & b'::tsquery, 'select target, subst from ts_subst');
ts_rewrite
-------------------------
'b' & ( 'foo' | 'bar' )
(1 row)

Shouldn't I have gotten 'b' & ( 'foo' | 'baz' ) ???

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2007-10-18 04:24:42 max_prepared_transactions default ... why 5?
Previous Message Tom Lane 2007-10-18 02:30:07 ts_rewrite aggregate API seems mighty ugly