From: | Umar Hayat <postgresql(dot)wizard(at)gmail(dot)com> |
---|---|
To: | Jim Jones <jim(dot)jones(at)uni-muenster(dot)de> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Add XMLNamespaces to XMLElement |
Date: | 2025-01-20 16:19:06 |
Message-ID: | CAD68Dp1auo16XUOT6Zz-cz7UzrH3eERN2hhwVYt9cbhq+Uby9Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Jim & Pavel,
Sorry for getting back a bit late on this. Few more case you might
need consider:
As I mentioned in my first static review about XMLTable existing
behaviour might change, I give it a run time review and here are few
findings:
1. Because of this patch XMLTable namespace will accept NO DEFAULT
value, I was expecting an error message based on prior behavior '' but
If I run following query it show something different:
"
> SELECT * FROM XMLTABLE(XMLNAMESPACES(NO DEFAULT),
'/rows/row'
PASSING '<rows
xmlns="http://x.y"><row><a>10</a></row></rows>'
COLUMNS a int PATH 'a');
ERROR: cache lookup failed for type 0
"
Can you please re-check this behaviour (there might be something wrong
with my build environment)
2. Seems like namespace as ColumnRef was already allowed (I doubt if
that's a correct implementation, I see other DB allows only strings
AFAIK), for non-default namespaces may be its fair, should this be
allowed for default namespace, any opinion.
create table tbl1 ( col1 text);
insert into tbl1 values ('abc');
insert into tbl1 values ('def');
select xmlelement(NAME "root", xmlnamespaces(default col1)) from tbl1;
xmlelement
---------------------
<root xmlns="abc"/>
<root xmlns="def"/>
(2 rows)
Changing status in commitfest, feel free to revert back.
Regards
Umar Hayat
On Sun, 19 Jan 2025 at 18:33, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de> wrote:
>
>
> On 16.01.25 08:36, Pavel Stehule wrote:
> > Now, I have not any objections against the code
> >
> > The patch has doc and enough regress tests
> > The patching and compilation without problems
> > make check-world passed
> >
> > I'll mark this patch as ready for committer
>
>
> rebase due to gram.y changes introduced in 80feb72
>
>
> --
> Jim
--
Umar Hayat
Bitnine (https://bitnine.net/)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2025-01-20 16:25:05 | Re: [PATCH] Add roman support for to_number function |
Previous Message | Logan MAUZAIZE | 2025-01-20 16:16:14 | Proper way to clean-up connection for reuse (`DISCARD ALL` and default role) |