Re: [PATCH] Add pretty-printed XML output option

Поиск
Список
Период
Сортировка
От Nikolay Samokhvalov
Тема Re: [PATCH] Add pretty-printed XML output option
Дата
Msg-id CANNMO+Kix1DRRa7m4o07qgRHh=0vOiO_x+_PsHOkQvT4GgLrLA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Add pretty-printed XML output option  (Jim Jones <jim.jones@uni-muenster.de>)
Ответы Re: [PATCH] Add pretty-printed XML output option
Список pgsql-hackers
On Mon, Feb 20, 2023 at 3:06 PM Jim Jones <jim.jones@uni-muenster.de> wrote:
As suggested by Peter and Nikolay, v15 now removes the xmlformat
function from the catalog and adds the [NO] INDENT option to
xmlserialize, as described in X069.\

Great. I'm checking this patch and it seems, indentation stops working if we have a text node inside:

gitpod=# select xmlserialize(document '<xml><more>13</more></xml>' as text indent);
              xmlserialize              
----------------------------------------
 <?xml version="1.0" encoding="UTF-8"?>+
 <xml>                                 +
   <more>13</more>                     +
 </xml>                                +
 
(1 row)

gitpod=# select xmlserialize(document '<xml>text<more>13</more></xml>' as text indent);
              xmlserialize              
----------------------------------------
 <?xml version="1.0" encoding="UTF-8"?>+
 <xml>text<more>13</more></xml>        +
 
(1 row) 

Worth to mention, Oracle behaves similarly -- indentation doesn't work: https://dbfiddle.uk/hRz5sXdM.

But is this as expected? Shouldn't it be like this:
<xml>
  text
  <more>13</more>
</xml>
?

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Hayato Kuroda (Fujitsu)"
Дата:
Сообщение: RE: Allow logical replication to copy tables in binary format
Следующее
От: Peter Smith
Дата:
Сообщение: Re: [PATCH] Add pretty-printed XML output option