Re: [PERFORM] Aggregating tsqueries

2014-09-18 Thread Heikki Linnakangas
On 09/17/2014 07:56 AM, Alexander Hill wrote: Hello, I have a table of tree nodes with a tsquery column. To get a subtree's tsquery, I need to OR all of its nodes' tsqueries together. I defined a custom aggregate using tsquery_or: CREATE AGGREGATE tsquery_or_agg (tsquery) (

[PERFORM] Aggregating tsqueries

2014-09-17 Thread Alexander Hill
Hello, I have a table of tree nodes with a tsquery column. To get a subtree's tsquery, I need to OR all of its nodes' tsqueries together. I defined a custom aggregate using tsquery_or: CREATE AGGREGATE tsquery_or_agg (tsquery) ( sfunc = tsquery_or, stype = tsquery );