Sam Mason wrote:
On Sun, Jul 12, 2009 at 09:49:15PM +0100, Roy Walter wrote:
Where exactly does that fit in terms of my original query, i.e.:
SELECT x
FROM (SELECT xpath('//entry[contains(p, ''searchtext'')]/@*', docxml)
AS x FROM docs) AS y WHERE x <> [test for empty array?
On Sun, Jul 12, 2009 at 09:49:15PM +0100, Roy Walter wrote:
> Where exactly does that fit in terms of my original query, i.e.:
>
>SELECT x
>FROM (SELECT xpath('//entry[contains(p, ''searchtext'')]/@*', docxml)
>AS x FROM docs) AS y WHERE x <> [test for empty array?]
Something
Scott Bailey wrote:
Sam Mason wrote:
On Sun, Jul 12, 2009 at 06:41:57PM +0100, Roy Walter wrote:
Scott Bailey wrote:
Roy Walter wrote:
How do I test for an empty array in postgres?
WHERE x != array[]::xml[]
Thanks Scott but that throws up a syntax error (at the closing
bracket of array[]
Sam Mason wrote:
On Sun, Jul 12, 2009 at 06:41:57PM +0100, Roy Walter wrote:
Scott Bailey wrote:
Roy Walter wrote:
How do I test for an empty array in postgres?
WHERE x != array[]::xml[]
Thanks Scott but that throws up a syntax error (at the closing bracket
of array[]):
ERROR: synta
On Sun, Jul 12, 2009 at 06:41:57PM +0100, Roy Walter wrote:
> Scott Bailey wrote:
> >Roy Walter wrote:
> >>How do I test for an empty array in postgres?
> >
> >WHERE x != array[]::xml[]
> >
> >
> Thanks Scott but that throws up a syntax error (at the closing bracket
> of array[]):
>
>ERROR:
Scott Bailey wrote:
Roy Walter wrote:
In postgres 8.4 When running xpath() queries it seems that empty
results are always returned. So if I query a table containing 1000
XML documents a 1000 rows will always be fetched even if the xpath()
element of the query only matches 10 documents.
The d
Roy Walter wrote:
In postgres 8.4 When running xpath() queries it seems that empty results
are always returned. So if I query a table containing 1000 XML documents
a 1000 rows will always be fetched even if the xpath() element of the
query only matches 10 documents.
The documentation states:
In postgres 8.4 When running xpath() queries it seems that empty results
are always returned. So if I query a table containing 1000 XML documents
a 1000 rows will always be fetched even if the xpath() element of the
query only matches 10 documents.
The documentation states:
The function |x