Search Postgresql Archives

Text search

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

 



I have a text column in a table. We store XML in this column. Now I want to search for tags and values

Example data:

<bank>
 
<name>Citi Bank</name>
  .....
  .....
/
<bank>

I would like to run the following query:

select * from xxxx where to_tsvector('english',xml_column) @@ to_tsquery('<name>Citi Bank</name>')

This works fine but it also works for any tag as long as the name 'Citi Bank' is present.

How do I have to setup my search in order for this to work so I get an exact match for the tag and value ?


[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