Search Postgresql Archives

XPath to search for elements in a sequence

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

 



With XML similar to:

<a>
 
<b>
 
<c>1</c>
 
<c>2</c>
 
<c>3</c>
</b>

I'm trying to create an xpath _expression_ (for a postgresql query) that will return if is a particular value and not that is all three values.

What I currently have (which does not work) is:

select * from someTable where xpath ('//uim:a/text()', job, ARRAY[ ARRAY['uim','http://www.cmpy.com/uim'] ])::text[] IN (ARRAY['1','3']);


If I try with ARRAY['1'] this will not return any values but with ARRAY['1','2','3'] it will return all three.


How can I select based on a single element in a sequence?


Thanks.


[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