fix typos in comments

Started by Dmitriy Olshevskiyalmost 11 years ago6 messageshackers
Jump to latest
#1Dmitriy Olshevskiy
olshevskiy87@bk.ru

Hello!

Please see this patch with several typos and
mistakes in comments.

There are also typos in sgml files (duplicate "to"):
1. doc/src/sgml/logicaldecoding.sgml, ln 619

Logical decoding can be used to to build

2. doc/src/sgml/ref/pg_dumpall.sgml, ln 457

Specifies the name of the database to connect

to to dump global

--
Dmitriy Olshevskiy

Attachments:

fix-typos-in-comments.patchtext/x-patch; name=fix-typos-in-comments.patchDownload+29-30
#2Andres Freund
andres@anarazel.de
In reply to: Dmitriy Olshevskiy (#1)
Re: fix typos in comments

Hi,

Man, whoever invented these an vs. a rules... But then this patch made
me lookup the rules ;)

On 2015-04-26 19:13:42 +0400, Dmitriy Olshevskiy wrote:

diff --git a/src/backend/optimizer/geqo/geqo_erx.c b/src/backend/optimizer/geqo/geqo_erx.c
index 69ac077..1a43ab7 100644
--- a/src/backend/optimizer/geqo/geqo_erx.c
+++ b/src/backend/optimizer/geqo/geqo_erx.c
@@ -138,7 +138,7 @@ gimme_edge_table(PlannerInfo *root, Gene *tour1, Gene *tour2,
*	  registers edge from city1 to city2 in input edge table
*
*	  no assumptions about directionality are made;
- *	  therefor it is up to the calling routine to
+ *	  therefore it is up to the calling routine to
*	  call gimme_edge twice to make a bi-directional edge
*	  between city1 and city2;
*	  uni-directional edges are possible as well (just call
gimme_edge

I think both are actually legal? Yes therefore is more common, but
still.

I left this out.

diff --git a/src/include/access/attnum.h b/src/include/access/attnum.h
index 82e811d..300b682 100644
--- a/src/include/access/attnum.h
+++ b/src/include/access/attnum.h
@@ -29,14 +29,14 @@ typedef int16 AttrNumber;
*/
/*
* AttributeNumberIsValid
- *		True iff the attribute number is valid.
+ *		True if the attribute number is valid.
*/
#define AttributeNumberIsValid(attributeNumber) \
((bool) ((attributeNumber) != InvalidAttrNumber))
/*
* AttrNumberIsForUserDefinedAttr
- *		True iff the attribute number corresponds to an user defined attribute.
+ *		True if the attribute number corresponds to a user defined attribute.
*/

Nope. Iff means "if and only if".

diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index f4dc0db..b131412 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -356,8 +356,8 @@ tas(volatile slock_t *lock)
/*
* Solaris has always run sparc processors in TSO (total store) mode, but
* linux didn't use to and the *BSDs still don't. So, be careful about
- * acquire/release semantics. The CPU will treat superflous membars as NOPs,
- * so it's just code space.
+ * acquire/release semantics. The CPU will treat superfluous membars as 
+ * NOPs, so it's just code space.
*/
#define HAS_TEST_AND_SET

superflous, err superfluous, trailing space removed.

I've pushed the rest. Thanks!

Greetings,

Andres Freund

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andres Freund (#2)
Re: fix typos in comments

Andres Freund <andres@anarazel.de> writes:

On 2015-04-26 19:13:42 +0400, Dmitriy Olshevskiy wrote:

- *	  therefor it is up to the calling routine to
+ *	  therefore it is up to the calling routine to

I think both are actually legal? Yes therefore is more common, but
still.

Hm. My dictionary says that "therefor" is archaic, but to my eye it
looks just wrong. Certainly no modern writer would spell it like that.

Nope. Iff means "if and only if".

Right, "iff" is intentional here (and in many other places). We've
discussed that before.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4Andres Freund
andres@anarazel.de
In reply to: Tom Lane (#3)
Re: fix typos in comments

On 2015-04-26 12:53:30 -0400, Tom Lane wrote:

Andres Freund <andres@anarazel.de> writes:

On 2015-04-26 19:13:42 +0400, Dmitriy Olshevskiy wrote:

- *	  therefor it is up to the calling routine to
+ *	  therefore it is up to the calling routine to

I think both are actually legal? Yes therefore is more common, but
still.

Hm. My dictionary says that "therefor" is archaic, but to my eye it
looks just wrong. Certainly no modern writer would spell it like that.

Mine said that it's still common in some circles, particularly the law,
so I thought I'd leave it alone. I don't have that much of a 'feeling'
for english, strangely enough.

Greetings,

Andres Freund

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andres Freund (#4)
Re: fix typos in comments

Andres Freund <andres@anarazel.de> writes:

On 2015-04-26 12:53:30 -0400, Tom Lane wrote:

Hm. My dictionary says that "therefor" is archaic, but to my eye it
looks just wrong. Certainly no modern writer would spell it like that.

Mine said that it's still common in some circles, particularly the law,
so I thought I'd leave it alone. I don't have that much of a 'feeling'
for english, strangely enough.

Well, a quick grep says that our source tree contains 2 occurrences of
"therefor" (in pqcomm.c and geqo_erx.c), versus 700+ occurrences of
"therefore". So I'd be inclined to standardize on the latter.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#6Andres Freund
andres@anarazel.de
In reply to: Tom Lane (#5)
Re: fix typos in comments

On 2015-04-26 13:03:52 -0400, Tom Lane wrote:

Andres Freund <andres@anarazel.de> writes:

On 2015-04-26 12:53:30 -0400, Tom Lane wrote:

Hm. My dictionary says that "therefor" is archaic, but to my eye it
looks just wrong. Certainly no modern writer would spell it like that.

Mine said that it's still common in some circles, particularly the law,
so I thought I'd leave it alone. I don't have that much of a 'feeling'
for english, strangely enough.

Well, a quick grep says that our source tree contains 2 occurrences of
"therefor" (in pqcomm.c and geqo_erx.c), versus 700+ occurrences of
"therefore". So I'd be inclined to standardize on the latter.

Done.

Greetings,

Andres Freund

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers