From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Chapman Flack <chap(at)anastigmatix(dot)net> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PostgreSQL vs SQL/XML Standards |
Date: | 2018-10-29 10:16:38 |
Message-ID: | CAFj8pRBDDj0Wh-3qrtC0J5tUB0z==AMh8jQ_DtiDvm7+NMZuOA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
po 29. 10. 2018 v 11:05 odesílatel Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
napsal:
>
> (It would not be exactly overloading, because of the special sugared
>>> syntax known to the parser, but it could look like overloading, and be
>>> intuitive to the user.)
>>>
>>> If you have convenient access to Oracle to check compatibility, could you
>>> compare this query?
>>>
>>> SELECT * FROM XMLTABLE('.'
>>> PASSING '<sale hatsize="7" customer="alice" taxable="false"/>'
>>> COLUMNS
>>> a boolean PATH 'string("cat" < "dog")',
>>> b boolean PATH 'string("cat" > "dog")',
>>> c boolean PATH 'string(sale/@taxable = false())');
>>>
>>> (I suspect in Oracle it would also work without the string() wrappings,
>>> but just to make it easy, I think this way it will work in both Oracle
>>> and PG—that is, not error, though results may differ.)
>>>
>>
>>
>>
> I have a access to too old 11.2 Oracle. There I had to modify query
> because there is not boolean type. I replaced bool by int, but I got a error
> ORA-19224:XPTY-004 .. expected node()*, got xs:string - it doesn't work
> with/without string() wrappings.
>
The problem is in last line - the expression "sale/@taxable = false()" is
not valid on Oracle. Using string() wrapping is a issue, because it returns
"true", "false", but Oracle int doesn't accept it.
Pavel
> Regards
>
> Pavel Stehule
>
>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2018-10-29 10:22:17 | Re: Ordered Partitioned Table Scans |
Previous Message | Pavel Stehule | 2018-10-29 10:05:08 | Re: PostgreSQL vs SQL/XML Standards |