Re: Incorrect Assert in BufFileSize()? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Incorrect Assert in BufFileSize()?
Date
Msg-id 3260453.1720023558@sss.pgh.pa.us
Whole thread Raw
In response to Re: Incorrect Assert in BufFileSize()?  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Incorrect Assert in BufFileSize()?
List pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> I've attached an updated patch which updates the comments and also
> removes the misplaced Asserts from BufFileAppend.
> If there are no objections or additional feedback, I'll push this patch soon.

- * Return the current fileset based BufFile size.
+ * Returns the size if the given BufFile in bytes.

"Returns the size of", no doubt?

A shade less nit-pickily, I wonder if "size" is sufficient.
It's not really obvious that this means the amount of data
in the file, rather than say sizeof(BufFile).  How about

+ * Returns the amount of data in the given BufFile, in bytes.

LGTM other than that point.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Marat Bukharov
Date:
Subject: Re: [PATCH] Add min/max aggregate functions to BYTEA
Next
From: Daniel Gustafsson
Date:
Subject: Re: Add support to TLS 1.3 cipher suites and curves lists