Re: xmlserialize bug - extra empty row at the end - Mailing list pgsql-hackers

From Isaac Morland
Subject Re: xmlserialize bug - extra empty row at the end
Date
Msg-id CAMsGm5f1z0A7G3edJTQB5iDzT2pHVx_NiGGz9GZju9pXx412xQ@mail.gmail.com
Whole thread Raw
In response to Re: xmlserialize bug - extra empty row at the end  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: xmlserialize bug - extra empty row at the end
List pgsql-hackers
On Sun, 23 Apr 2023 at 10:52, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Isaac Morland <isaac.morland@gmail.com> writes:
 
> I might go so
> far as to change the psql display routines to not leave a blank line after
> the content in the event it ends with a newline.

psql has *no* business changing what it displays: if what came from the
server has a trailing newline, that had better be made visible.  Even if
we thought it was a good idea, it's about 25 years too late to reconsider
that.  However, xmlserialize()'s new indenting behavior isn't set in
stone yet, so we could contemplate chomping newlines within that.

The trailing newline is made visible by the little bent arrow character that appears at the right hand side. So you could still tell whether the value ended with a trailing newline. I agree that simply dropping the trailing newline before displaying the value would be a very bad idea.

pgsql-hackers by date:

Previous
From: Jelte Fennema
Date:
Subject: Re: run pgindent on a regular basis / scripted manner
Next
From: Pavel Stehule
Date:
Subject: Re: xmlserialize bug - extra empty row at the end