Re: Adding comments to help understand psql hidden queries - Mailing list pgsql-hackers

From David Christensen
Subject Re: Adding comments to help understand psql hidden queries
Date
Msg-id CAHM0NXi5G9RwtH_MRQkh2jcZMvn8Uubm9pMn=KW-AuwYcNk51w@mail.gmail.com
Whole thread Raw
In response to Re: Adding comments to help understand psql hidden queries  (Greg Sabino Mullane <htamfids@gmail.com>)
Responses Re: Adding comments to help understand psql hidden queries
List pgsql-hackers
I got Greg's blessing on squashing the commits down, and now including
a v4 with additional improvements on the output formatting front.
Main changes:

- all generated comments are the same width
- width has been bumped to 80
- removed _() functions for consumers of the new output functions

This patch adds two new helper functions, OutputComment() and
OutputCommentStars() to output and wrap the comments to the
appropriate widths.  Everything should continue to work just fine if
we want to adjust the width by just adjusting the MAX_COMMENT_WIDTH
symbol.

I removed _() in the output of the query/stars since there'd be no
sensible existing translations for the constructed string, which
included the query string itself.  If we need it for the "QUERY"
string, this could be added fairly easily, but the existing piece
would have been nonsensical and never used in practice.

Thanks,

David

Attachment

pgsql-hackers by date:

Previous
From: Melanie Plageman
Date:
Subject: Re: Combine Prune and Freeze records emitted by vacuum
Next
From: Heikki Linnakangas
Date:
Subject: Re: Use streaming read API in ANALYZE