Re: Use or not record count on examples - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Use or not record count on examples
Date
Msg-id CAKFQuwar_eg2Pp+jz_MpuWN-pHYgqp-88AK=7OeA4ruN66RRWw@mail.gmail.com
Whole thread Raw
In response to Use or not record count on examples  (Marcos Pegoraro <marcos@f10.com.br>)
List pgsql-hackers
On Sat, Nov 23, 2024 at 5:30 AM Marcos Pegoraro <marcos@f10.com.br> wrote:
There is no rule of when the number of records at the end of the lists should be shown or not
Sometimes we show that line "(4 rows)", but sometimes not.
Should we have a standard for it ?

I'm inclined toward no.

If we do, we probably want to separate out the rules for the tutorial versus those for the reference sections.

I'm fine with devising guidelines on what is considered added readability versus detracts from the same, but I don't think making a global pass at removing them is warranted nor would I want to go back and add them in where they might be warranted.  Let the author and reviewers come to agreement on appropriateness and just accept past decisions.

The later example of pg_ls_dir('.') has more issues than just the row count if you consider the row count to be an issue.

The settings example has the same recency concern.  Maybe examples just shouldn't use non-deterministic queries in general.  The few that need to can omit a row count and point out the volatile nature of the result being saved into the static documentation.

David J.

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Commitfest app release on Feb 17 with many improvements
Next
From: "David G. Johnston"
Date:
Subject: Re: New "single" COPY format