| From: | "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> |
|---|---|
| To: | "Andrew Dunstan" <andrew(at)dunslane(dot)net> |
| Cc: | "Nikolay Samokhvalov" <samokhvalov(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: proposal casting from XML[] to int[], numeric[], text[] |
| Date: | 2007-11-12 09:45:57 |
| Message-ID: | 162867790711120145i19c52049pea9a6ac25a2d352@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Magnus Hagander | 2007-11-12 09:50:48 | Re: 8.2.3: Server crashes on Windows using Eclipse/Junit |
| Previous Message | Heikki Linnakangas | 2007-11-12 09:12:16 | Re: How to keep a table in memory? |