Thread: Incorrect use of "an" and "a" in code comments and docs
Hi all, While looking at something else, I have one one occurence of $subject. Looking more deeply at the code I have found 10 more of them, like: - sinval is a signal invalidation, so it seems to me that "a" is correct, not "an". - I bumped into "an" being used instead of "and" in the GIN code. - config/c-library.m4 also includes one. If that code is from somewhere else, fixing this typo would not be appropriate perhaps? Attached is a proposal of patch to fix all those things. Thanks, -- Michael
Attachment
On Mon, Mar 05, 2018 at 01:58:54PM +0900, Michael Paquier wrote: > While looking at something else, I have one one occurence of $subject. > Looking more deeply at the code I have found 10 more of them, like: > - sinval is a signal invalidation, so it seems to me that "a" is > correct, not "an". > - I bumped into "an" being used instead of "and" in the GIN code. > - config/c-library.m4 also includes one. If that code is from somewhere > else, fixing this typo would not be appropriate perhaps? > > Attached is a proposal of patch to fix all those things. And of course I forgot to attach the actual patch. (Thanks Thomas for telling me off-list). -- Michael
Attachment
At 2018-03-05 14:42:14 +0900, michael@paquier.xyz wrote: > > > - sinval is a signal invalidation, so it seems to me that "a" is > > correct, not "an". I guess it depends on whether you read it as "sin-val" or "ess-inval". > diff --git a/src/backend/access/gin/ginvacuum.c b/src/backend/access/gin/ginvacuum.c > index 398532d80b..8b08b46ff6 100644 > --- a/src/backend/access/gin/ginvacuum.c > +++ b/src/backend/access/gin/ginvacuum.c > @@ -381,7 +381,7 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot) > > /* > * All subtree is empty - just return true to indicate that parent > - * must do a cleanup. Unless we are ROOT an there is way to go upper. > + * must do a cleanup. Unless we are ROOT and there is way to go upper. > */ That particular comment could use some more changes. :-) -- Abhijit
On Mon, Mar 05, 2018 at 11:21:18AM +0530, Abhijit Menon-Sen wrote: > At 2018-03-05 14:42:14 +0900, michael@paquier.xyz wrote: >> >>> - sinval is a signal invalidation, so it seems to me that "a" is >>> correct, not "an". > > I guess it depends on whether you read it as "sin-val" or "ess-inval". That is an ex-aequo in the core code: there are two places with "an sinval" and two with "a sinval". -- Michael
Attachment
On 5 March 2018 at 18:42, Michael Paquier <michael@paquier.xyz> wrote: > On Mon, Mar 05, 2018 at 01:58:54PM +0900, Michael Paquier wrote: >> Attached is a proposal of patch to fix all those things. > > And of course I forgot to attach the actual patch. (Thanks Thomas for > telling me off-list). If you're doing a round of that, then you may as well throw [1] into the mix. It's gone a bit dead over there, and it does seem like it would be good to not have two separate commits for these. [1] https://www.postgresql.org/message-id/CAKJS1f81A20mO_A___3sDnTZcZEH-2Pd5oTeiAUb=Qo2r9MrXw@mail.gmail.com -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
On 2018-03-05 11:21:18 +0530, Abhijit Menon-Sen wrote: > At 2018-03-05 14:42:14 +0900, michael@paquier.xyz wrote: > > > > > - sinval is a signal invalidation, so it seems to me that "a" is > > > correct, not "an". > > I guess it depends on whether you read it as "sin-val" or "ess-inval". It stands for shared invalidation, so I'd vote for the former. Not that I think this really matters... ;) Greetings, Andres Freund
On Mon, Mar 5, 2018 at 6:51 PM, Abhijit Menon-Sen <ams@2ndquadrant.com> wrote: > At 2018-03-05 14:42:14 +0900, michael@paquier.xyz wrote: >> > - sinval is a signal invalidation, so it seems to me that "a" is >> > correct, not "an". > > I guess it depends on whether you read it as "sin-val" or "ess-inval". $ git grep ' a SQL ' | wc -l 642 $ git grep ' an SQL ' | wc -l 219 /me grabs popcorn -- Thomas Munro http://www.enterprisedb.com
On Mon, Mar 05, 2018 at 07:42:40PM +1300, Thomas Munro wrote: > $ git grep ' a SQL ' | wc -l > 642 > $ git grep ' an SQL ' | wc -l > 219 > > /me grabs popcorn ess-queue-el, sir. -- Michael
Attachment
Michael Paquier wrote: > On Mon, Mar 05, 2018 at 07:42:40PM +1300, Thomas Munro wrote: > > $ git grep ' a SQL ' | wc -l > > 642 > > $ git grep ' an SQL ' | wc -l > > 219 > > > > /me grabs popcorn > > ess-queue-el, sir. Yeah, but http://patorjk.com/blog/2012/01/26/pronouncing-sql-s-q-l-or-sequel/ -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
On Mon, Mar 5, 2018 at 07:23:22PM +1300, David Rowley wrote: > On 5 March 2018 at 18:42, Michael Paquier <michael@paquier.xyz> wrote: > > On Mon, Mar 05, 2018 at 01:58:54PM +0900, Michael Paquier wrote: > >> Attached is a proposal of patch to fix all those things. > > > > And of course I forgot to attach the actual patch. (Thanks Thomas for > > telling me off-list). > > If you're doing a round of that, then you may as well throw [1] into > the mix. It's gone a bit dead over there, and it does seem like it > would be good to not have two separate commits for these. > > [1] https://www.postgresql.org/message-id/CAKJS1f81A20mO_A___3sDnTZcZEH-2Pd5oTeiAUb=Qo2r9MrXw@mail.gmail.com This has been applied already: commit 3beb46ae8118f64d94518ba105b5e5c79e2ce194 Author: Alvaro Herrera <alvherre@alvh.no-ip.org> Date: Mon Mar 12 12:58:35 2018 -0300 docs: Fix typo: a -> an David Rowley -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +
On Mon, Mar 5, 2018 at 01:58:54PM +0900, Michael Paquier wrote: > Hi all, > > While looking at something else, I have one one occurence of $subject. > Looking more deeply at the code I have found 10 more of them, like: > - sinval is a signal invalidation, so it seems to me that "a" is > correct, not "an". > - I bumped into "an" being used instead of "and" in the GIN code. > - config/c-library.m4 also includes one. If that code is from somewhere > else, fixing this typo would not be appropriate perhaps? > > Attached is a proposal of patch to fix all those things. Attached patch applied. It includes a suggested fix by Abhijit Menon-Sen. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +
Attachment
On Mon, Mar 5, 2018 at 07:42:40PM +1300, Thomas Munro wrote: > On Mon, Mar 5, 2018 at 6:51 PM, Abhijit Menon-Sen <ams@2ndquadrant.com> wrote: > > At 2018-03-05 14:42:14 +0900, michael@paquier.xyz wrote: > >> > - sinval is a signal invalidation, so it seems to me that "a" is > >> > correct, not "an". > > > > I guess it depends on whether you read it as "sin-val" or "ess-inval". > > $ git grep ' a SQL ' | wc -l > 642 > $ git grep ' an SQL ' | wc -l > 219 > > /me grabs popcorn I am planning to look into this, and will convert to "an" in my proposed patch. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +
On Thu, Mar 29, 2018 at 03:28:32PM -0400, Bruce Momjian wrote: > Attached patch applied. It includes a suggested fix by Abhijit > Menon-Sen. Thanks Bruce. -- Michael
Attachment
On Thu, Mar 29, 2018 at 03:29:24PM -0400, Bruce Momjian wrote: > I am planning to look into this, and will convert to "an" in my proposed > patch. Thanks. Let's see that on another thread.. -- Michael