Re: xmlserialize bug - extra empty row at the end

From: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
To: Isaac Morland <isaac(dot)morland(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: xmlserialize bug - extra empty row at the end
Date: 2023-04-23 21:56:39
Message-ID: 5e3c0501-9e79-cb97-ef96-d27eed417ea6@uni-muenster.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> My inclination would be, if we're just calling to a long-standardized
> library routine, to just accept its output as is. If a program is
> saving the output to a text file, that would be the expected
> behaviour. If not, then we need to document that the output of our
> function is the output of the library function, minus the trailing
> newline.

After some digging on the matter, I'd also tend to leave the output as
is, but I also do understand the other arguments - specially the
consistency with jsonb_pretty().

If we agree to remove it, the change wouldn't be substantial :) I guess
we could just pchomp it in the end of the function, as suggested by Tom.
Attached a draft patch.

Best, Jim

Attachment Content-Type Size
xmlserialize-remove-trailing-newline.diff text/x-patch 4.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2023-04-23 22:01:24 Re: run pgindent on a regular basis / scripted manner
Previous Message Magnus Hagander 2023-04-23 21:52:24 Re: run pgindent on a regular basis / scripted manner