| From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
|---|---|
| To: | Jim Jones <jim(dot)jones(at)uni-muenster(dot)de> |
| Cc: | Chapman Flack <chap(at)anastigmatix(dot)net>, vignesh C <vignesh21(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH] Add CANONICAL option to xmlserialize |
| Date: | 2024-08-25 19:49:24 |
| Message-ID: | CAFj8pRB11UDhubGinA9sLVVx678wXMkvxStLFTLvn+H3D2M=Qg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
ne 25. 8. 2024 v 20:57 odesílatel Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
napsal:
> Hi
>
> so 24. 8. 2024 v 7:40 odesílatel Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
> napsal:
>
>>
>> On 19.06.24 10:59, Jim Jones wrote:
>> > On 09.02.24 14:19, Jim Jones wrote:
>> >> v9 attached with rebase due to changes done to primnodes.h in 615f5f6
>> >>
>> > v10 attached with rebase due to changes in primnodes, parsenodes.h, and
>> > gram.y
>> >
>> v11 attached with rebase due to changes in xml.c
>>
>
> I try to check this patch
>
> There is unwanted white space in the patch
>
> -<-><--><-->xmlFreeDoc(doc);
> +<->else if (format == XMLSERIALIZE_CANONICAL || format ==
> XMLSERIALIZE_CANONICAL_WITH_NO_COMMENTS)
> + <>{
> +<-><-->xmlChar *xmlbuf = NULL;
> +<-><-->int nbytes;
> +<-><-->int
>
> 1. the xml is serialized to UTF8 string every time, but when target type
> is varchar or text, then it should be every time encoded to database
> encoding. Is not possible to hold utf8 string in latin2 database varchar.
>
> 2. The proposed feature can increase some confusion in implementation of
> NO IDENT. I am not an expert on this area, so I checked other databases.
> DB2 does not have anything similar. But Oracle's "NO IDENT" clause is very
> similar to the proposed "CANONICAL". Unfortunately, there is different
> behaviour of NO IDENT - Oracle's really removes formatting, Postgres does
> nothing.
>
> Regards
>
I read https://www.w3.org/TR/xml-c14n11/ and if I understand this document,
then CANONICAL <> "NO INDENT" ?
Regards
Pavel
> Pavel
>
>
>
>> --
>> Jim
>>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alexander Korotkov | 2024-08-25 21:22:03 | Re: type cache cleanup improvements |
| Previous Message | Alexander Korotkov | 2024-08-25 19:21:19 | Re: type cache cleanup improvements |