Re: proposal casting from XML[] to int[], numeric[], text[] - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: proposal casting from XML[] to int[], numeric[], text[]
Date
Msg-id 162867790711120145i19c52049pea9a6ac25a2d352@mail.gmail.com
Whole thread Raw
In response to Re: proposal casting from XML[] to int[], numeric[], text[]  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
> >
> > You're right, that's my mistake, sorry. So, having casting rules seems
> > to be the only option..
> >
>
>
> We can already cast as text[], and so we can do this:
>
> andrew=# select
> xpath('//foo/text()','<a><foo>1</foo><foo>2</foo></a>')::text[]::int[];
>  xpath
> -------
>  {1,2}
> (1 row)
>
>
> So why do we desperately need anything extra at all?
>

I was blind. My problem was with function index over xml array, that
isn't indexable.

I didn't find multiple casting.

Regards
Pavel

> cheers
>
> andrew
>


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: How to keep a table in memory?
Next
From: Magnus Hagander
Date:
Subject: Re: 8.2.3: Server crashes on Windows using Eclipse/Junit