Re: [GENERAL] XML index

2010-05-27 Thread Chris Roffler
Changed the create index statement to : USING hash and it seems to work. Any idea why btree does not work ? Thanks Chris On Thu, May 27, 2010 at 3:47 PM, Chris Roffler wrote: > Tried that same thing > > > On Thu, May 27, 2010 at 1:53 PM, Thom Brown wrote: > >> On 27 May 2010 12:22, Chr

Re: [GENERAL] XML index

2010-05-27 Thread Chris Roffler
Tried that same thing On Thu, May 27, 2010 at 1:53 PM, Thom Brown wrote: > On 27 May 2010 12:22, Chris Roffler wrote: > > I have a table with an xml column, created an index as follows: > > CREATE INDEX xml_index > > ON test > > USING btree > > (((xpath('//*/ChangedBy/text()'::text,

Re: [GENERAL] XML index

2010-05-27 Thread Thom Brown
On 27 May 2010 12:22, Chris Roffler wrote: > I have a table with an xml column, created an index as follows: > CREATE INDEX xml_index >   ON test >   USING btree >   (((xpath('//*/ChangedBy/text()'::text, external_attributes))[1]::text)); > And here is my select statement: > Select uuid from t >  

Re: [GENERAL] XML Index again

2010-03-08 Thread Chris Roffler
Yup you are right however I am trying to run benchmarks with the two solutions. The xml solution will give us more flexibility in the future , just in case we do not have attribute/value lists :) On Mon, Mar 8, 2010 at 1:33 PM, Alban Hertroys < dal...@solfertje.student.utwente.nl> wrote: >

Re: [GENERAL] XML Index again

2010-03-08 Thread Alban Hertroys
On 8 Mar 2010, at 13:23, Chris Roffler wrote: > Alban > > thanks for your response. I understand what you are saying . > > >Your previous query wasn't about attributes in any specific position - it > >returned documents that contained >more than zero attributes matching a > >given name. Wh

Re: [GENERAL] XML Index again

2010-03-08 Thread Chris Roffler
Alban thanks for your response. I understand what you are saying . >Your previous query wasn't about attributes in any specific position - it returned documents that contained >more than zero attributes matching a given name. What are you trying to do this time? And that is exactly my proble

Re: [GENERAL] XML Index again

2010-03-08 Thread Alban Hertroys
On 8 Mar 2010, at 11:39, Chris Roffler wrote: > Alban > > Thanks for your help, your suggestion worked. > > I need another xpath expression to find any Attribute with Name ="" > under the Attributes node. (not just if it is in a specific position) > see query below. > How do I create an

Re: [GENERAL] XML Index again

2010-03-08 Thread Alban Hertroys
On 8 Mar 2010, at 11:39, Chris Roffler wrote: > Alban > > Thanks for your help, your suggestion worked. > > I need another xpath expression to find any Attribute with Name ="" > under the Attributes node. (not just if it is in a specific position) > see query below. Your previous query

Re: [GENERAL] XML Index again

2010-03-08 Thread Chris Roffler
Alban Thanks for your help, your suggestion worked. I need another xpath expression to find any Attribute with Name ="" under the Attributes node. (not just if it is in a specific position) see query below. How do I create an index for this xpath expression ? Thanks Chris SELECT * FROM

Re: [GENERAL] XML Index again

2010-03-07 Thread Chris
Alban thanks for your replay. Yes I am looking for node exists ... I'll give it a roll. >There are a couple of cases where Postgres won't use your index, but in this >case it's quite clearly because you're asking for (quite) a different >expression than the one you indexed. > >You seem to wa

Re: [GENERAL] XML Index again

2010-03-07 Thread Alban Hertroys
On 7 Mar 2010, at 11:02, Chris Roffler wrote: > I still have some problems with my xml index > > CREATE INDEX xml_index > ON time_series > USING btree > (( > (xpath('/AttributeList/Attributes/Attribute/Name/text()', > external_attributes))[1]::text)); > > When I run the following query