Re: xmlserialize bug - extra empty row at the end

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Isaac Morland <isaac(dot)morland(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: xmlserialize bug - extra empty row at the end
Date: 2023-04-23 14:52:27
Message-ID: 3838135.1682261547@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Isaac Morland <isaac(dot)morland(at)gmail(dot)com> writes:
> That being said, this is a database column result and I agree it would look
> more elegant if the blank line in the display were not there.

Yeah, that would basically be the argument for editorializing on libxml2's
result. It's a weak argument, but not entirely without merit.

> 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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2023-04-23 15:04:33 Re: run pgindent on a regular basis / scripted manner
Previous Message Pavel Stehule 2023-04-23 14:50:41 Re: xmlserialize bug - extra empty row at the end