Fix comment typo in /src/backend/command/cluster.c

Started by Sawada Masahikoalmost 12 years ago8 messages
#1Sawada Masahiko
sawada.mshk@gmail.com
1 attachment(s)

Hi all,

Attached patch fixes the typo which is in "src/backend/command/cluster.c".

Regards,

-------
Sawada Masahiko

Attachments:

fix_typo-cluster.patchapplication/octet-stream; name=fix_typo-cluster.patchDownload
*** a/src/backend/commands/cluster.c
--- b/src/backend/commands/cluster.c
***************
*** 803,809 **** copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex, bool verbose,
  		LockRelationOid(OldHeap->rd_rel->reltoastrelid, AccessExclusiveLock);
  
  	/*
! 	 * We need to log the copied data in WAL iff WAL archiving/streaming is
  	 * enabled AND it's a WAL-logged rel.
  	 */
  	use_wal = XLogIsNeeded() && RelationNeedsWAL(NewHeap);
--- 803,809 ----
  		LockRelationOid(OldHeap->rd_rel->reltoastrelid, AccessExclusiveLock);
  
  	/*
! 	 * We need to log the copied data in WAL if WAL archiving/streaming is
  	 * enabled AND it's a WAL-logged rel.
  	 */
  	use_wal = XLogIsNeeded() && RelationNeedsWAL(NewHeap);
#2Andrew Dunstan
andrew@dunslane.net
In reply to: Sawada Masahiko (#1)
Re: Fix comment typo in /src/backend/command/cluster.c

On 01/27/2014 10:24 PM, Sawada Masahiko wrote:

Hi all,

Attached patch fixes the typo which is in "src/backend/command/cluster.c".

Are you sure that's a typo? "iff" is usually short hand for "if and only
if".

cheers

andrew

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

#3Gavin Flower
GavinFlower@archidevsys.co.nz
In reply to: Andrew Dunstan (#2)
Re: Fix comment typo in /src/backend/command/cluster.c

On 28/01/14 16:33, Andrew Dunstan wrote:

On 01/27/2014 10:24 PM, Sawada Masahiko wrote:

Hi all,

Attached patch fixes the typo which is in
"src/backend/command/cluster.c".

Are you sure that's a typo? "iff" is usually short hand for "if and
only if".

cheers

andrew

Certainly, that is how I would interpret it.

I came across that abbreviation in a first years Maths course
"Principles of Mathematics" in 1968 at the University of Auckland..

Cheers,
Gavin

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

#4Sawada Masahiko
sawada.mshk@gmail.com
In reply to: Andrew Dunstan (#2)
Re: Fix comment typo in /src/backend/command/cluster.c

On 01/27/2014 10:24 PM, Sawada Masahiko wrote:

Hi all,

Attached patch fixes the typo which is in "src/backend/command/cluster.
c".

Are you sure that's a typo? "iff" is usually short hand for "if and only
if".

Oops, I made mistake.
Thanks!

Regards,

-----
Masahiko Sawada

--
Regards,

-------
Sawada Masahiko

#5David Fetter
david@fetter.org
In reply to: Gavin Flower (#3)
Re: Fix comment typo in /src/backend/command/cluster.c

On Tue, Jan 28, 2014 at 04:48:35PM +1300, Gavin Flower wrote:

On 28/01/14 16:33, Andrew Dunstan wrote:

On 01/27/2014 10:24 PM, Sawada Masahiko wrote:

Hi all,

Attached patch fixes the typo which is in
"src/backend/command/cluster.c".

Are you sure that's a typo? "iff" is usually short hand for "if
and only if".

cheers

andrew

Certainly, that is how I would interpret it.

I came across that abbreviation in a first years Maths course
"Principles of Mathematics" in 1968 at the University of Auckland..

By my rough count (ack -l '\biff\b' |wc -l), it's used to mean
equivalence 81 times in the source tree. Should we have a glossary of
such terms?

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

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

#6Michael Paquier
michael.paquier@gmail.com
In reply to: David Fetter (#5)
Re: Fix comment typo in /src/backend/command/cluster.c

On Tue, Jan 28, 2014 at 2:29 PM, David Fetter <david@fetter.org> wrote:

On Tue, Jan 28, 2014 at 04:48:35PM +1300, Gavin Flower wrote:

On 28/01/14 16:33, Andrew Dunstan wrote:

On 01/27/2014 10:24 PM, Sawada Masahiko wrote:

Hi all,

Attached patch fixes the typo which is in
"src/backend/command/cluster.c".

Are you sure that's a typo? "iff" is usually short hand for "if
and only if".

cheers

andrew

Certainly, that is how I would interpret it.

I came across that abbreviation in a first years Maths course
"Principles of Mathematics" in 1968 at the University of Auckland..

By my rough count (ack -l '\biff\b' |wc -l), it's used to mean
equivalence 81 times in the source tree. Should we have a glossary of
such terms?

And what about directly replacing those expressions in the comments of
the code with some more understandable language? This would be more
suited for non-native English speakers than maintaining a glossary
that you can surely find here and there after some googling.
--
Michael

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

#7David Fetter
david@fetter.org
In reply to: Michael Paquier (#6)
1 attachment(s)
Re: Fix comment typo in /src/backend/command/cluster.c

On Tue, Jan 28, 2014 at 02:51:22PM +0900, Michael Paquier wrote:

On Tue, Jan 28, 2014 at 2:29 PM, David Fetter <david@fetter.org> wrote:

On Tue, Jan 28, 2014 at 04:48:35PM +1300, Gavin Flower wrote:

On 28/01/14 16:33, Andrew Dunstan wrote:

On 01/27/2014 10:24 PM, Sawada Masahiko wrote:

Hi all,

Attached patch fixes the typo which is in
"src/backend/command/cluster.c".

Are you sure that's a typo? "iff" is usually short hand for "if
and only if".

cheers

andrew

Certainly, that is how I would interpret it.

I came across that abbreviation in a first years Maths course
"Principles of Mathematics" in 1968 at the University of Auckland..

By my rough count (ack -l '\biff\b' |wc -l), it's used to mean
equivalence 81 times in the source tree. Should we have a glossary of
such terms?

And what about directly replacing those expressions in the comments of
the code with some more understandable language? This would be more
suited for non-native English speakers than maintaining a glossary
that you can surely find here and there after some googling.

I'm interested to find 29 instances of "if and only if" in the source,
which should be the same thing.

Please find attached a mechanically done patch which expands the
remaining instances of "iff" to the longer form, all of which are in
comments. The patched source passes make -j8, but I have not tested
it further.

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

Attachments:

de_iff_01.patchtext/plain; charset=us-asciiDownload
diff --git a/contrib/auto_explain/auto_explain.c b/contrib/auto_explain/auto_explain.c
index af68479..7ecb9b4 100644
--- a/contrib/auto_explain/auto_explain.c
+++ b/contrib/auto_explain/auto_explain.c
@@ -181,7 +181,7 @@ explain_ExecutorStart(QueryDesc *queryDesc, int eflags)
 {
 	if (auto_explain_enabled())
 	{
-		/* Enable per-node instrumentation iff log_analyze is required. */
+		/* Enable per-node instrumentation if and only if log_analyze is required. */
 		if (auto_explain_log_analyze && (eflags & EXEC_FLAG_EXPLAIN_ONLY) == 0)
 		{
 			if (auto_explain_log_timing)
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c
index 16b7ab5..b0837c3 100644
--- a/contrib/pgbench/pgbench.c
+++ b/contrib/pgbench/pgbench.c
@@ -909,7 +909,7 @@ agg_vals_init(AggVals *aggs, instr_time start)
 	aggs->start_time = INSTR_TIME_GET_DOUBLE(start);
 }
 
-/* return false iff client should be disconnected */
+/* return false if and only if client should be disconnected */
 static bool
 doCustom(TState *thread, CState *st, instr_time *conn_time, FILE *logfile, AggVals *agg)
 {
diff --git a/doc/src/sgml/stylesheet.dsl b/doc/src/sgml/stylesheet.dsl
index 29e885d..7682d79 100644
--- a/doc/src/sgml/stylesheet.dsl
+++ b/doc/src/sgml/stylesheet.dsl
@@ -86,7 +86,7 @@
 ;   ((member (gi ancestor) (book-element-list))
 ;    #t)
    ;; Add indirect references to the section or component a block
-   ;; is in iff chapters aren't autolabelled.  (Otherwise "Figure 1-3"
+   ;; is in if and only if chapters aren't autolabelled.  (Otherwise "Figure 1-3"
    ;; is sufficient)
    ((and (member (gi target) (block-element-list))
          (not %chapter-autolabel%))
diff --git a/src/backend/access/common/heaptuple.c b/src/backend/access/common/heaptuple.c
index 3d8d2eb..39b04d8 100644
--- a/src/backend/access/common/heaptuple.c
+++ b/src/backend/access/common/heaptuple.c
@@ -261,7 +261,7 @@ heap_fill_tuple(TupleDesc tupleDesc,
  */
 
 /* ----------------
- *		heap_attisnull	- returns TRUE iff tuple attribute is not present
+ *		heap_attisnull	- returns TRUE if and only if tuple attribute is not present
  * ----------------
  */
 bool
diff --git a/src/backend/access/gin/ginget.c b/src/backend/access/gin/ginget.c
index 4bdbd45..a8e0625 100644
--- a/src/backend/access/gin/ginget.c
+++ b/src/backend/access/gin/ginget.c
@@ -705,7 +705,7 @@ entryGetItem(GinState *ginstate, GinScanEntry entry)
  * The current item is the smallest curItem among the inputs.  key->curItem
  * is set to that value.  key->curItemMatches is set to indicate whether that
  * TID passes the consistentFn test.  If so, key->recheckCurItem is set true
- * iff recheck is needed for this item pointer (including the case where the
+ * if and only if recheck is needed for this item pointer (including the case where the
  * item pointer is a lossy page pointer).
  *
  * If all entry streams are exhausted, sets key->isFinished to TRUE.
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index a771ccb..9f86af4 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -3020,7 +3020,7 @@ simple_heap_delete(Relation relation, ItemPointer tid)
  *
  * On success, the header fields of *newtup are updated to match the new
  * stored tuple; in particular, newtup->t_self is set to the TID where the
- * new tuple was inserted, and its HEAP_ONLY_TUPLE flag is set iff a HOT
+ * new tuple was inserted, and its HEAP_ONLY_TUPLE flag is set if and only if a HOT
  * update was done.  However, any TOAST changes in the new tuple's
  * data are not reflected into *newtup.
  *
@@ -4943,7 +4943,7 @@ l5:
 	else
 	{
 		/*
-		 * Can get here iff the locking/updating transaction was running when
+		 * Can get here if and only if the locking/updating transaction was running when
 		 * the infomask was extracted from the tuple, but finished before
 		 * TransactionIdIsInProgress got to run.  Deal with it as if there was
 		 * no locker at all in the first place.
diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c
index 9ddc275..4565148 100644
--- a/src/backend/access/nbtree/nbtsort.c
+++ b/src/backend/access/nbtree/nbtsort.c
@@ -215,7 +215,7 @@ _bt_leafbuild(BTSpool *btspool, BTSpool *btspool2)
 	wstate.index = btspool->index;
 
 	/*
-	 * We need to log index creation in WAL iff WAL archiving/streaming is
+	 * We need to log index creation in WAL if and only if WAL archiving/streaming is
 	 * enabled UNLESS the index isn't WAL-logged anyway.
 	 */
 	wstate.btws_use_wal = XLogIsNeeded() && RelationNeedsWAL(wstate.index);
diff --git a/src/backend/access/transam/README b/src/backend/access/transam/README
index 3a32471..7caaee6 100644
--- a/src/backend/access/transam/README
+++ b/src/backend/access/transam/README
@@ -438,7 +438,7 @@ critical section.)
 4. Mark the shared buffer(s) as dirty with MarkBufferDirty().  (This must
 happen before the WAL record is inserted; see notes in SyncOneBuffer().)
 Note that marking a buffer dirty with MarkBufferDirty() should only
-happen iff you write a WAL record; see Writing Hints below.
+happen if and only if you write a WAL record; see Writing Hints below.
 
 5. If the relation requires WAL-logging, build a WAL log record and pass it
 to XLogInsert(); then update the page's LSN using the returned XLOG
@@ -590,7 +590,7 @@ Writing Hints
 -------------
 
 In some cases, we write additional information to data blocks without
-writing a preceding WAL record. This should only happen iff the data can
+writing a preceding WAL record. This should only happen if and only if the data can
 be reconstructed later following a crash and the action is simply a way
 of optimising for performance. When a hint is written we use
 MarkBufferDirtyHint() to mark the block dirty.
diff --git a/src/backend/access/transam/transam.c b/src/backend/access/transam/transam.c
index 8965319..46aeb58 100644
--- a/src/backend/access/transam/transam.c
+++ b/src/backend/access/transam/transam.c
@@ -116,7 +116,7 @@ TransactionLogFetch(TransactionId transactionId)
 
 /*
  * TransactionIdDidCommit
- *		True iff transaction associated with the identifier did commit.
+ *		True if and only if transaction associated with the identifier did commit.
  *
  * Note:
  *		Assumes transaction identifier is valid.
@@ -172,7 +172,7 @@ TransactionIdDidCommit(TransactionId transactionId)
 
 /*
  * TransactionIdDidAbort
- *		True iff transaction associated with the identifier did abort.
+ *		True if and only if transaction associated with the identifier did abort.
  *
  * Note:
  *		Assumes transaction identifier is valid.
@@ -221,7 +221,7 @@ TransactionIdDidAbort(TransactionId transactionId)
 
 /*
  * TransactionIdIsKnownCompleted
- *		True iff transaction associated with the identifier is currently
+ *		True if and only if transaction associated with the identifier is currently
  *		known to have either committed or aborted.
  *
  * This does NOT look into pg_clog but merely probes our local cache
diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c
index 66dbf58..9b62ccb 100644
--- a/src/backend/access/transam/twophase.c
+++ b/src/backend/access/transam/twophase.c
@@ -509,7 +509,7 @@ RemoveGXact(GlobalTransaction gxact)
 
 /*
  * TransactionIdIsPrepared
- *		True iff transaction associated with the identifier is prepared
+ *		True if and only if transaction associated with the identifier is prepared
  *		for two-phase commit
  *
  * Note: only gxacts marked "valid" are considered; but notice we do not
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index e3002eb..08eddca 100644
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -97,7 +97,7 @@ GetDatabasePath(Oid dbNode, Oid spcNode)
 
 /*
  * IsSystemRelation
- *		True iff the relation is either a system catalog or toast table.
+ *		True if and only if the relation is either a system catalog or toast table.
  *		By a system catalog, we mean one that created in the pg_catalog schema
  * 		during initdb.  User-created relations in pg_catalog don't count as
  *		system catalogs.
@@ -127,7 +127,7 @@ IsSystemClass(Oid relid, Form_pg_class reltuple)
 
 /*
  * IsCatalogRelation
- *		True iff the relation is a system catalog, or the toast table for
+ *		True if and only if the relation is a system catalog, or the toast table for
  *		a system catalog.  By a system catalog, we mean one that created
  *		in the pg_catalog schema during initdb.  As with IsSystemRelation(),
  *		user-created relations in pg_catalog don't count as system catalogs.
@@ -144,7 +144,7 @@ IsCatalogRelation(Relation relation)
 
 /*
  * IsCatalogClass
- *		True iff the relation is a system catalog relation.
+ *		True if and only if the relation is a system catalog relation.
  *
  * Check IsCatalogRelation() for details.
  */
@@ -178,7 +178,7 @@ IsCatalogClass(Oid relid, Form_pg_class reltuple)
 
 /*
  * IsToastRelation
- *		True iff relation is a TOAST support relation (or index).
+ *		True if and only if relation is a TOAST support relation (or index).
  */
 bool
 IsToastRelation(Relation relation)
@@ -202,7 +202,7 @@ IsToastClass(Form_pg_class reltuple)
 
 /*
  * IsSystemNamespace
- *		True iff namespace is pg_catalog.
+ *		True if and only if namespace is pg_catalog.
  *
  * NOTE: the reason this isn't a macro is to avoid having to include
  * catalog/pg_namespace.h in a lot of places.
@@ -215,7 +215,7 @@ IsSystemNamespace(Oid namespaceId)
 
 /*
  * IsToastNamespace
- *		True iff namespace is pg_toast or my temporary-toast-table namespace.
+ *		True if and only if namespace is pg_toast or my temporary-toast-table namespace.
  *
  * Note: this will return false for temporary-toast-table namespaces belonging
  * to other backends.  Those are treated the same as other backends' regular
@@ -231,7 +231,7 @@ IsToastNamespace(Oid namespaceId)
 
 /*
  * IsReservedName
- *		True iff name starts with the pg_ prefix.
+ *		True if and only if name starts with the pg_ prefix.
  *
  *		For some classes of objects, the prefix pg_ is reserved for
  *		system objects only.  As of 8.0, this is only true for
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index e7fcb55..9530ba5 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -355,7 +355,7 @@ do_analyze_rel(Relation onerel, VacuumStmt *vacstmt,
 						   save_sec_context | SECURITY_RESTRICTED_OPERATION);
 	save_nestlevel = NewGUCNestLevel();
 
-	/* measure elapsed time iff autovacuum logging requires it */
+	/* measure elapsed time if and only if autovacuum logging requires it */
 	if (IsAutoVacuumWorkerProcess() && Log_autovacuum_min_duration >= 0)
 	{
 		pg_rusage_init(&ru0);
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 14a5e5a..98de792 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -803,7 +803,7 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex, bool verbose,
 		LockRelationOid(OldHeap->rd_rel->reltoastrelid, AccessExclusiveLock);
 
 	/*
-	 * We need to log the copied data in WAL iff WAL archiving/streaming is
+	 * We need to log the copied data in WAL if and only if WAL archiving/streaming is
 	 * enabled AND it's a WAL-logged rel.
 	 */
 	use_wal = XLogIsNeeded() && RelationNeedsWAL(NewHeap);
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index 4259c47..ef15160 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -1052,7 +1052,7 @@ ComputeIndexAttrs(IndexInfo *indexInfo,
 			attcollation = get_collation_oid(attribute->collation, false);
 
 		/*
-		 * Check we have a collation iff it's a collatable type.  The only
+		 * Check we have a collation if and only if it's a collatable type.  The only
 		 * expected failures here are (1) COLLATE applied to a noncollatable
 		 * type, or (2) index expression had an unresolved collation.  But we
 		 * might as well code this to be a complete consistency check.
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 08b037e..0c59480 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -9136,7 +9136,7 @@ copy_relation_data(SMgrRelation src, SMgrRelation dst,
 	page = (Page) buf;
 
 	/*
-	 * We need to log the copied data in WAL iff WAL archiving/streaming is
+	 * We need to log the copied data in WAL if and only if WAL archiving/streaming is
 	 * enabled AND it's a permanent relation.
 	 */
 	use_wal = XLogIsNeeded() && relpersistence == RELPERSISTENCE_PERMANENT;
diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c
index 75e5f15..d8faa79 100644
--- a/src/backend/commands/vacuumlazy.c
+++ b/src/backend/commands/vacuumlazy.c
@@ -190,7 +190,7 @@ lazy_vacuum_rel(Relation onerel, VacuumStmt *vacstmt,
 	TransactionId new_frozen_xid;
 	MultiXactId new_min_multi;
 
-	/* measure elapsed time iff autovacuum logging requires it */
+	/* measure elapsed time if and only if autovacuum logging requires it */
 	if (IsAutoVacuumWorkerProcess() && Log_autovacuum_min_duration >= 0)
 	{
 		pg_rusage_init(&ru0);
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 6b5f198..493a8c9 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -1250,7 +1250,7 @@ ExecGetTriggerResultRel(EState *estate, Oid relid)
  *		ExecContextForcesOids
  *
  * This is pretty grotty: when doing INSERT, UPDATE, or CREATE TABLE AS,
- * we need to ensure that result tuples have space for an OID iff they are
+ * we need to ensure that result tuples have space for an OID if and only if they are
  * going to be stored into a relation that has OIDs.  In other contexts
  * we are free to choose whether to leave space for OIDs in result tuples
  * (we generally don't want to, but we do if a physical-tlist optimization
diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c
index 0eba025..d8af8ba 100644
--- a/src/backend/executor/execQual.c
+++ b/src/backend/executor/execQual.c
@@ -5103,7 +5103,7 @@ ExecPrepareExpr(Expr *node, EState *estate)
  *		ExecQual
  *
  *		Evaluates a conjunctive boolean expression (qual list) and
- *		returns true iff none of the subexpressions are false.
+ *		returns true if and only if none of the subexpressions are false.
  *		(We also return true if the list is empty.)
  *
  *	If some of the subexpressions yield NULL but none yield FALSE,
diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c
index 9c17970..d7d93ec 100644
--- a/src/backend/executor/functions.c
+++ b/src/backend/executor/functions.c
@@ -1500,7 +1500,7 @@ ShutdownSQLFunction(Datum arg)
  * (Obviously the caller must pass a parsetree that is okay to modify when
  * using this flag.)  Note that this flag does not affect whether the tlist is
  * considered to be a legal match to the result type, only how we react to
- * allowed not-exact-match cases.  *modifyTargetList will be set true iff
+ * allowed not-exact-match cases.  *modifyTargetList will be set true if and only if
  * we had to make any "dangerous" changes that could modify the semantics of
  * the statement.  If it is set true, the caller should not use the modified
  * statement, but for simplicity we apply the changes anyway.
diff --git a/src/backend/executor/nodeAppend.c b/src/backend/executor/nodeAppend.c
index 6185c1d..6fbce8a 100644
--- a/src/backend/executor/nodeAppend.c
+++ b/src/backend/executor/nodeAppend.c
@@ -68,7 +68,7 @@ static bool exec_append_initialize_next(AppendState *appendstate);
  *
  *		Sets up the append state node for the "next" scan.
  *
- *		Returns t iff there is a "next" scan to process.
+ *		Returns t if and only if there is a "next" scan to process.
  * ----------------------------------------------------------------
  */
 static bool
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c
index 9d0c389..75e593f 100644
--- a/src/backend/libpq/auth.c
+++ b/src/backend/libpq/auth.c
@@ -1388,7 +1388,7 @@ interpret_ident_response(const char *ident_response,
  *
  *	IP addresses and port numbers are in network byte order.
  *
- *	But iff we're unable to get the information from ident, return false.
+ *	But if and only if we're unable to get the information from ident, return false.
  */
 static int
 ident_inet(hbaPort *port)
diff --git a/src/backend/nodes/list.c b/src/backend/nodes/list.c
index aebc5b6..af7cbe5 100644
--- a/src/backend/nodes/list.c
+++ b/src/backend/nodes/list.c
@@ -439,7 +439,7 @@ list_nth_oid(const List *list, int n)
 }
 
 /*
- * Return true iff 'datum' is a member of the list. Equality is
+ * Return true if and only if 'datum' is a member of the list. Equality is
  * determined via equal(), so callers should ensure that they pass a
  * Node as 'datum'.
  */
@@ -461,7 +461,7 @@ list_member(const List *list, const void *datum)
 }
 
 /*
- * Return true iff 'datum' is a member of the list. Equality is
+ * Return true if and only if 'datum' is a member of the list. Equality is
  * determined by using simple pointer comparison.
  */
 bool
@@ -482,7 +482,7 @@ list_member_ptr(const List *list, const void *datum)
 }
 
 /*
- * Return true iff the integer 'datum' is a member of the list.
+ * Return true if and only if the integer 'datum' is a member of the list.
  */
 bool
 list_member_int(const List *list, int datum)
@@ -502,7 +502,7 @@ list_member_int(const List *list, int datum)
 }
 
 /*
- * Return true iff the OID 'datum' is a member of the list.
+ * Return true if and only if the OID 'datum' is a member of the list.
  */
 bool
 list_member_oid(const List *list, Oid datum)
@@ -523,7 +523,7 @@ list_member_oid(const List *list, Oid datum)
 
 /*
  * Delete 'cell' from 'list'; 'prev' is the previous element to 'cell'
- * in 'list', if any (i.e. prev == NULL iff list->head == cell)
+ * in 'list', if any (i.e. prev == NULL if and only if list->head == cell)
  *
  * The cell is pfree'd, as is the List header if this was the last member.
  */
diff --git a/src/backend/nodes/nodeFuncs.c b/src/backend/nodes/nodeFuncs.c
index 123f2a6..03c4fdf 100644
--- a/src/backend/nodes/nodeFuncs.c
+++ b/src/backend/nodes/nodeFuncs.c
@@ -1545,7 +1545,7 @@ leftmostLoc(int loc1, int loc2)
  * "true" to abort the walk and immediately return "true" to the top-level
  * caller.	This can be used to short-circuit the traversal if the walker
  * has found what it came for.	"false" is returned to the top-level caller
- * iff no invocation of the walker returned "true".
+ * if and only if no invocation of the walker returned "true".
  *
  * The node types handled by expression_tree_walker include all those
  * normally found in target lists and qualifier clauses during the planning
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c
index a912174..52f4236 100644
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -1085,7 +1085,7 @@ build_paths_for_OR(PlannerInfo *root, RelOptInfo *rel,
 		 * test whether the added clauses are sufficient to imply the
 		 * predicate. If so, we can use the index in the current context.
 		 *
-		 * We set useful_predicate to true iff the predicate was proven using
+		 * We set useful_predicate to true if and only if the predicate was proven using
 		 * the current set of clauses.	This is needed to prevent matching a
 		 * predOK index to an arm of an OR, which would be a legal but
 		 * pointlessly inefficient plan.  (A better plan will be generated by
diff --git a/src/backend/optimizer/path/pathkeys.c b/src/backend/optimizer/path/pathkeys.c
index 9179c61..05af96c 100644
--- a/src/backend/optimizer/path/pathkeys.c
+++ b/src/backend/optimizer/path/pathkeys.c
@@ -1432,7 +1432,7 @@ right_merge_direction(PlannerInfo *root, PathKey *pathkey)
 		{
 			/*
 			 * Found a matching query sort column.	Prefer this pathkey's
-			 * direction iff it matches.  Note that we ignore pk_nulls_first,
+			 * direction if and only if it matches.  Note that we ignore pk_nulls_first,
 			 * which means that a sort might be needed anyway ... but we still
 			 * want to prefer only one of the two possible directions, and we
 			 * might as well use this one.
diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c
index 201529b..5929641 100644
--- a/src/backend/optimizer/util/clauses.c
+++ b/src/backend/optimizer/util/clauses.c
@@ -218,7 +218,7 @@ get_rightop(const Expr *clause)
 /*
  * not_clause
  *
- * Returns t iff this is a 'not' clause: (NOT expr).
+ * Returns t if and only if this is a 'not' clause: (NOT expr).
  */
 bool
 not_clause(Node *clause)
@@ -262,7 +262,7 @@ get_notclausearg(Expr *notclause)
 /*
  * or_clause
  *
- * Returns t iff the clause is an 'or' clause: (OR { expr }).
+ * Returns t if and only if the clause is an 'or' clause: (OR { expr }).
  */
 bool
 or_clause(Node *clause)
@@ -296,7 +296,7 @@ make_orclause(List *orclauses)
 /*
  * and_clause
  *
- * Returns t iff its argument is an 'and' clause: (AND { expr }).
+ * Returns t if and only if its argument is an 'and' clause: (AND { expr }).
  */
 bool
 and_clause(Node *clause)
diff --git a/src/backend/optimizer/util/predtest.c b/src/backend/optimizer/util/predtest.c
index eadd2d5..b6a995a 100644
--- a/src/backend/optimizer/util/predtest.c
+++ b/src/backend/optimizer/util/predtest.c
@@ -214,16 +214,16 @@ predicate_refuted_by(List *predicate_list, List *restrictinfo_list)
  *	  predicate clauses.
  *
  * The logic followed here is ("=>" means "implies"):
- *	atom A => atom B iff:			predicate_implied_by_simple_clause says so
- *	atom A => AND-expr B iff:		A => each of B's components
- *	atom A => OR-expr B iff:		A => any of B's components
- *	AND-expr A => atom B iff:		any of A's components => B
- *	AND-expr A => AND-expr B iff:	A => each of B's components
- *	AND-expr A => OR-expr B iff:	A => any of B's components,
+ *	atom A => atom B if and only if:			predicate_implied_by_simple_clause says so
+ *	atom A => AND-expr B if and only if:		A => each of B's components
+ *	atom A => OR-expr B if and only if:		A => any of B's components
+ *	AND-expr A => atom B if and only if:		any of A's components => B
+ *	AND-expr A => AND-expr B if and only if:	A => each of B's components
+ *	AND-expr A => OR-expr B if and only if:	A => any of B's components,
  *									*or* any of A's components => B
- *	OR-expr A => atom B iff:		each of A's components => B
- *	OR-expr A => AND-expr B iff:	A => each of B's components
- *	OR-expr A => OR-expr B iff:		each of A's components => any of B's
+ *	OR-expr A => atom B if and only if:		each of A's components => B
+ *	OR-expr A => AND-expr B if and only if:	A => each of B's components
+ *	OR-expr A => OR-expr B if and only if:		each of A's components => any of B's
  *
  * An "atom" is anything other than an AND or OR node.	Notice that we don't
  * have any special logic to handle NOT nodes; these should have been pushed
@@ -449,16 +449,16 @@ predicate_implied_by_recurse(Node *clause, Node *predicate)
  *	  predicate clauses.
  *
  * The logic followed here is ("R=>" means "refutes"):
- *	atom A R=> atom B iff:			predicate_refuted_by_simple_clause says so
- *	atom A R=> AND-expr B iff:		A R=> any of B's components
- *	atom A R=> OR-expr B iff:		A R=> each of B's components
- *	AND-expr A R=> atom B iff:		any of A's components R=> B
- *	AND-expr A R=> AND-expr B iff:	A R=> any of B's components,
+ *	atom A R=> atom B if and only if:			predicate_refuted_by_simple_clause says so
+ *	atom A R=> AND-expr B if and only if:		A R=> any of B's components
+ *	atom A R=> OR-expr B if and only if:		A R=> each of B's components
+ *	AND-expr A R=> atom B if and only if:		any of A's components R=> B
+ *	AND-expr A R=> AND-expr B if and only if:	A R=> any of B's components,
  *									*or* any of A's components R=> B
- *	AND-expr A R=> OR-expr B iff:	A R=> each of B's components
- *	OR-expr A R=> atom B iff:		each of A's components R=> B
- *	OR-expr A R=> AND-expr B iff:	each of A's components R=> any of B's
- *	OR-expr A R=> OR-expr B iff:	A R=> each of B's components
+ *	AND-expr A R=> OR-expr B if and only if:	A R=> each of B's components
+ *	OR-expr A R=> atom B if and only if:		each of A's components R=> B
+ *	OR-expr A R=> AND-expr B if and only if:	each of A's components R=> any of B's
+ *	OR-expr A R=> OR-expr B if and only if:	A R=> each of B's components
  *
  * In addition, if the predicate is a NOT-clause then we can use
  *	A R=> NOT B if:					A => B
diff --git a/src/backend/optimizer/util/relnode.c b/src/backend/optimizer/util/relnode.c
index 8ae8f55..c77477b 100644
--- a/src/backend/optimizer/util/relnode.c
+++ b/src/backend/optimizer/util/relnode.c
@@ -99,7 +99,7 @@ build_simple_rel(PlannerInfo *root, int relid, RelOptKind reloptkind)
 	rel->relids = bms_make_singleton(relid);
 	rel->rows = 0;
 	rel->width = 0;
-	/* cheap startup cost is interesting iff not all tuples to be retrieved */
+	/* cheap startup cost is interesting if and only if not all tuples to be retrieved */
 	rel->consider_startup = (root->tuple_fraction > 0);
 	rel->reltargetlist = NIL;
 	rel->pathlist = NIL;
@@ -358,7 +358,7 @@ build_join_rel(PlannerInfo *root,
 	joinrel->relids = bms_copy(joinrelids);
 	joinrel->rows = 0;
 	joinrel->width = 0;
-	/* cheap startup cost is interesting iff not all tuples to be retrieved */
+	/* cheap startup cost is interesting if and only if not all tuples to be retrieved */
 	joinrel->consider_startup = (root->tuple_fraction > 0);
 	joinrel->reltargetlist = NIL;
 	joinrel->pathlist = NIL;
diff --git a/src/backend/optimizer/util/restrictinfo.c b/src/backend/optimizer/util/restrictinfo.c
index 62de590..617b1dd 100644
--- a/src/backend/optimizer/util/restrictinfo.c
+++ b/src/backend/optimizer/util/restrictinfo.c
@@ -318,7 +318,7 @@ make_sub_restrictinfos(Expr *clause,
 /*
  * restriction_is_or_clause
  *
- * Returns t iff the restrictinfo node contains an 'or' clause.
+ * Returns t if and only if the restrictinfo node contains an 'or' clause.
  */
 bool
 restriction_is_or_clause(RestrictInfo *restrictinfo)
diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c
index aa704bb..0a8be82 100644
--- a/src/backend/parser/parse_clause.c
+++ b/src/backend/parser/parse_clause.c
@@ -240,7 +240,7 @@ interpretInhOption(InhOption inhOpt)
 }
 
 /*
- * Given a relation-options list (of DefElems), return true iff the specified
+ * Given a relation-options list (of DefElems), return true if and only if the specified
  * table/result set should be created with OIDs. This needs to be done after
  * parsing the query string because the return value can depend upon the
  * default_with_oids GUC var.
diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c
index 854d723..956f128 100644
--- a/src/backend/parser/parse_coerce.c
+++ b/src/backend/parser/parse_coerce.c
@@ -1406,7 +1406,7 @@ check_generic_type_consistency(Oid *actual_arg_types,
 	{
 		if (array_typeid == ANYARRAYOID)
 		{
-			/* Special case for ANYARRAY input: okay iff no ANYELEMENT */
+			/* Special case for ANYARRAY input: okay if and only if no ANYELEMENT */
 			if (have_anyelement)
 				return false;
 			return true;
@@ -1648,7 +1648,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types,
 	{
 		if (array_typeid == ANYARRAYOID && !have_anyelement)
 		{
-			/* Special case for ANYARRAY input: okay iff no ANYELEMENT */
+			/* Special case for ANYARRAY input: okay if and only if no ANYELEMENT */
 			array_typelem = ANYELEMENTOID;
 		}
 		else
@@ -1685,7 +1685,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types,
 	{
 		if (range_typeid == ANYRANGEOID && !have_anyelement)
 		{
-			/* Special case for ANYRANGE input: okay iff no ANYELEMENT */
+			/* Special case for ANYRANGE input: okay if and only if no ANYELEMENT */
 			range_typelem = ANYELEMENTOID;
 		}
 		else
diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c
index 8760952..f33a5a3 100644
--- a/src/backend/parser/parse_relation.c
+++ b/src/backend/parser/parse_relation.c
@@ -2894,7 +2894,7 @@ errorMissingColumn(ParseState *pstate,
 
 
 /*
- * Examine a fully-parsed query, and return TRUE iff any relation underlying
+ * Examine a fully-parsed query, and return TRUE if and only if any relation underlying
  * the query is a temporary relation (table, view, or materialized view).
  */
 bool
diff --git a/src/backend/storage/lmgr/lmgr.c b/src/backend/storage/lmgr/lmgr.c
index 4c61a6f..c49e872 100644
--- a/src/backend/storage/lmgr/lmgr.c
+++ b/src/backend/storage/lmgr/lmgr.c
@@ -96,7 +96,7 @@ LockRelationOid(Oid relid, LOCKMODE lockmode)
  *		ConditionalLockRelationOid
  *
  * As above, but only lock if we can get the lock without blocking.
- * Returns TRUE iff the lock was acquired.
+ * Returns TRUE if and only if the lock was acquired.
  *
  * NOTE: we do not currently need conditional versions of all the
  * LockXXX routines in this file, but they could easily be added if needed.
@@ -345,7 +345,7 @@ LockPage(Relation relation, BlockNumber blkno, LOCKMODE lockmode)
  *		ConditionalLockPage
  *
  * As above, but only lock if we can get the lock without blocking.
- * Returns TRUE iff the lock was acquired.
+ * Returns TRUE if and only if the lock was acquired.
  */
 bool
 ConditionalLockPage(Relation relation, BlockNumber blkno, LOCKMODE lockmode)
@@ -401,7 +401,7 @@ LockTuple(Relation relation, ItemPointer tid, LOCKMODE lockmode)
  *		ConditionalLockTuple
  *
  * As above, but only lock if we can get the lock without blocking.
- * Returns TRUE iff the lock was acquired.
+ * Returns TRUE if and only if the lock was acquired.
  */
 bool
 ConditionalLockTuple(Relation relation, ItemPointer tid, LOCKMODE lockmode)
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index b7612b9..5c90fcf 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -903,7 +903,7 @@ exec_simple_query(const char *query_string)
 	MemoryContextSwitchTo(oldcontext);
 
 	/*
-	 * We'll tell PortalRun it's a top-level command iff there's exactly one
+	 * We'll tell PortalRun it's a top-level command if and only if there's exactly one
 	 * raw parsetree.  If more than one, it's effectively a transaction block
 	 * and we want PreventTransactionChain to reject unsafe commands. (Note:
 	 * we're assuming that query rewrite cannot add commands that are
diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c
index f85bd03..805dd4f 100644
--- a/src/backend/tcop/pquery.c
+++ b/src/backend/tcop/pquery.c
@@ -807,7 +807,7 @@ PortalRun(Portal portal, long count, bool isTopLevel,
 				portal->status = PORTAL_READY;
 
 				/*
-				 * Since it's a forward fetch, say DONE iff atEnd is now true.
+				 * Since it's a forward fetch, say DONE if and only if atEnd is now true.
 				 */
 				result = portal->atEnd;
 				break;
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index 10729d5..363678f 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -650,7 +650,7 @@ aclitemout(PG_FUNCTION_ARGS)
 
 /*
  * aclitem_match
- *		Two AclItems are considered to match iff they have the same
+ *		Two AclItems are considered to match if and only if they have the same
  *		grantee and grantor; the privileges are ignored.
  */
 static bool
diff --git a/src/backend/utils/adt/array_selfuncs.c b/src/backend/utils/adt/array_selfuncs.c
index e35edf8..3206c33 100644
--- a/src/backend/utils/adt/array_selfuncs.c
+++ b/src/backend/utils/adt/array_selfuncs.c
@@ -1021,7 +1021,7 @@ calc_hist(const float4 *hist, int nhist, int n)
  *
  * Imagine matrix M of size (n + 1) x (m + 1).	Element M[i,j] denotes the
  * probability that exactly j of first i events occur.	Obviously M[0,0] = 1.
- * For any constant j, each increment of i increases the probability iff the
+ * For any constant j, each increment of i increases the probability if and only if the
  * event occurs.  So, by the law of total probability:
  *	M[i,j] = M[i - 1, j] * (1 - p[i]) + M[i - 1, j - 1] * p[i]
  *		for i > 0, j > 0.
diff --git a/src/backend/utils/adt/array_userfuncs.c b/src/backend/utils/adt/array_userfuncs.c
index c62e3fb..412d471 100644
--- a/src/backend/utils/adt/array_userfuncs.c
+++ b/src/backend/utils/adt/array_userfuncs.c
@@ -522,7 +522,7 @@ array_agg_finalfn(PG_FUNCTION_ARGS)
 	 * possible for users to create NULL constants of type internal.
 	 */
 	if (PG_ARGISNULL(0))
-		PG_RETURN_NULL();		/* returns null iff no input values */
+		PG_RETURN_NULL();		/* returns null if and only if no input values */
 
 	/* cannot be called directly because of internal-type argument */
 	Assert(AggCheckCallContext(fcinfo, NULL));
diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c
index 311d0c2..adafd4a 100644
--- a/src/backend/utils/adt/arrayfuncs.c
+++ b/src/backend/utils/adt/arrayfuncs.c
@@ -651,7 +651,7 @@ ArrayCount(const char *str, int *dim, char typdelim)
  * Outputs:
  *	values[]: filled with converted data values.
  *	nulls[]: filled with is-null markers.
- *	*hasnulls: set TRUE iff there are any null elements.
+ *	*hasnulls: set TRUE if and only if there are any null elements.
  *	*nbytes: set to total size of data area needed (including alignment
  *		padding but not including array header overhead).
  *
@@ -1377,7 +1377,7 @@ array_recv(PG_FUNCTION_ARGS)
  * Outputs:
  *	values[]: filled with converted data values.
  *	nulls[]: filled with is-null markers.
- *	*hasnulls: set TRUE iff there are any null elements.
+ *	*hasnulls: set TRUE if and only if there are any null elements.
  *	*nbytes: set to total size of data area needed (including alignment
  *		padding but not including array header overhead).
  *
diff --git a/src/backend/utils/adt/int.c b/src/backend/utils/adt/int.c
index 669355e..bcf7c17 100644
--- a/src/backend/utils/adt/int.c
+++ b/src/backend/utils/adt/int.c
@@ -378,12 +378,12 @@ bool_int4(PG_FUNCTION_ARGS)
  */
 
 /*
- *		inteq			- returns 1 iff arg1 == arg2
- *		intne			- returns 1 iff arg1 != arg2
- *		intlt			- returns 1 iff arg1 < arg2
- *		intle			- returns 1 iff arg1 <= arg2
- *		intgt			- returns 1 iff arg1 > arg2
- *		intge			- returns 1 iff arg1 >= arg2
+ *		inteq			- returns 1 if and only if arg1 == arg2
+ *		intne			- returns 1 if and only if arg1 != arg2
+ *		intlt			- returns 1 if and only if arg1 < arg2
+ *		intle			- returns 1 if and only if arg1 <= arg2
+ *		intgt			- returns 1 if and only if arg1 > arg2
+ *		intge			- returns 1 if and only if arg1 >= arg2
  */
 
 Datum
diff --git a/src/backend/utils/adt/like_match.c b/src/backend/utils/adt/like_match.c
index 1e5e00a..9cb14da 100644
--- a/src/backend/utils/adt/like_match.c
+++ b/src/backend/utils/adt/like_match.c
@@ -220,7 +220,7 @@ MatchText(char *t, int tlen, char *p, int plen,
 		return LIKE_FALSE;		/* end of pattern, but not of text */
 
 	/*
-	 * End of text, but perhaps not of pattern.  Match iff the remaining
+	 * End of text, but perhaps not of pattern.  Match if and only if the remaining
 	 * pattern can match a zero-length string, ie, it's zero or more %'s.
 	 */
 	while (plen > 0 && *p == '%')
diff --git a/src/backend/utils/adt/mac.c b/src/backend/utils/adt/mac.c
index aa9993f..732a4ac 100644
--- a/src/backend/utils/adt/mac.c
+++ b/src/backend/utils/adt/mac.c
@@ -40,7 +40,7 @@ macaddr_in(PG_FUNCTION_ARGS)
 	char		junk[2];
 	int			count;
 
-	/* %1s matches iff there is trailing non-whitespace garbage */
+	/* %1s matches if and only if there is trailing non-whitespace garbage */
 
 	count = sscanf(str, "%x:%x:%x:%x:%x:%x%1s",
 				   &a, &b, &c, &d, &e, &f, junk);
diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c
index 74d24aa..61ee24d 100644
--- a/src/backend/utils/adt/nabstime.c
+++ b/src/backend/utils/adt/nabstime.c
@@ -959,7 +959,7 @@ timemi(PG_FUNCTION_ARGS)
 
 
 /*
- *		intinterval		- returns true iff absolute date is in the tinterval
+ *		intinterval		- returns true if and only if absolute date is in the tinterval
  */
 Datum
 intinterval(PG_FUNCTION_ARGS)
@@ -1107,7 +1107,7 @@ btreltimecmp(PG_FUNCTION_ARGS)
 
 
 /*
- *		tintervalsame	- returns true iff tinterval i1 is same as tinterval i2
+ *		tintervalsame	- returns true if and only if tinterval i1 is same as tinterval i2
  *		Check begin and end time.
  */
 Datum
@@ -1256,17 +1256,17 @@ bttintervalcmp(PG_FUNCTION_ARGS)
 
 
 /*
- *		tintervalleneq	- returns true iff length of tinterval i is equal to
+ *		tintervalleneq	- returns true if and only if length of tinterval i is equal to
  *								reltime t
- *		tintervallenne	- returns true iff length of tinterval i is not equal
+ *		tintervallenne	- returns true if and only if length of tinterval i is not equal
  *								to reltime t
- *		tintervallenlt	- returns true iff length of tinterval i is less than
+ *		tintervallenlt	- returns true if and only if length of tinterval i is less than
  *								reltime t
- *		tintervallengt	- returns true iff length of tinterval i is greater
+ *		tintervallengt	- returns true if and only if length of tinterval i is greater
  *								than reltime t
- *		tintervallenle	- returns true iff length of tinterval i is less or
+ *		tintervallenle	- returns true if and only if length of tinterval i is less or
  *								equal than reltime t
- *		tintervallenge	- returns true iff length of tinterval i is greater or
+ *		tintervallenge	- returns true if and only if length of tinterval i is greater or
  *								equal than reltime t
  */
 Datum
@@ -1354,7 +1354,7 @@ tintervallenge(PG_FUNCTION_ARGS)
 }
 
 /*
- *		tintervalct		- returns true iff tinterval i1 contains tinterval i2
+ *		tintervalct		- returns true if and only if tinterval i1 contains tinterval i2
  */
 Datum
 tintervalct(PG_FUNCTION_ARGS)
@@ -1375,7 +1375,7 @@ tintervalct(PG_FUNCTION_ARGS)
 }
 
 /*
- *		tintervalov		- returns true iff tinterval i1 (partially) overlaps i2
+ *		tintervalov		- returns true if and only if tinterval i1 (partially) overlaps i2
  */
 Datum
 tintervalov(PG_FUNCTION_ARGS)
diff --git a/src/backend/utils/adt/name.c b/src/backend/utils/adt/name.c
index a851502..f9d0a9c 100644
--- a/src/backend/utils/adt/name.c
+++ b/src/backend/utils/adt/name.c
@@ -117,17 +117,17 @@ namesend(PG_FUNCTION_ARGS)
  *****************************************************************************/
 
 /*
- *		nameeq	- returns 1 iff arguments are equal
- *		namene	- returns 1 iff arguments are not equal
+ *		nameeq	- returns 1 if and only if arguments are equal
+ *		namene	- returns 1 if and only if arguments are not equal
  *
  *		BUGS:
  *				Assumes that "xy\0\0a" should be equal to "xy\0b".
  *				If not, can do the comparison backwards for efficiency.
  *
- *		namelt	- returns 1 iff a < b
- *		namele	- returns 1 iff a <= b
- *		namegt	- returns 1 iff a > b
- *		namege	- returns 1 iff a >= b
+ *		namelt	- returns 1 if and only if a < b
+ *		namele	- returns 1 if and only if a <= b
+ *		namegt	- returns 1 if and only if a > b
+ *		namege	- returns 1 if and only if a >= b
  *
  */
 Datum
diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c
index 0bf350a..a3d7860 100644
--- a/src/backend/utils/adt/pg_locale.c
+++ b/src/backend/utils/adt/pg_locale.c
@@ -1166,7 +1166,7 @@ pg_newlocale_from_collation(Oid collid)
  *
  * This has the same API as the standard wcstombs_l() function; in particular,
  * tolen is the maximum number of bytes to store at *to, and *from must be
- * zero-terminated.  The output will be zero-terminated iff there is room.
+ * zero-terminated.  The output will be zero-terminated if and only if there is room.
  */
 size_t
 wchar2char(char *to, const wchar_t *from, size_t tolen, pg_locale_t locale)
@@ -1235,7 +1235,7 @@ wchar2char(char *to, const wchar_t *from, size_t tolen, pg_locale_t locale)
  * null-terminated; instead, the number of input bytes is specified as
  * fromlen.  Also, we ereport() rather than returning -1 for invalid
  * input encoding.	tolen is the maximum number of wchar_t's to store at *to.
- * The output will be zero-terminated iff there is room.
+ * The output will be zero-terminated if and only if there is room.
  */
 size_t
 char2wchar(wchar_t *to, size_t tolen, const char *from, size_t fromlen,
diff --git a/src/backend/utils/adt/tsvector_op.c b/src/backend/utils/adt/tsvector_op.c
index 8b71de2..69b3665 100644
--- a/src/backend/utils/adt/tsvector_op.c
+++ b/src/backend/utils/adt/tsvector_op.c
@@ -550,7 +550,7 @@ tsvector_concat(PG_FUNCTION_ARGS)
 /*
  * Compare two strings by tsvector rules.
  *
- * if isPrefix = true then it returns zero value iff b has prefix a
+ * if isPrefix = true then it returns zero value if and only if b has prefix a
  */
 int32
 tsCompareString(char *a, int lena, char *b, int lenb, bool prefix)
diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c
index d17b6b0..e19f6da 100644
--- a/src/backend/utils/cache/catcache.c
+++ b/src/backend/utils/cache/catcache.c
@@ -1508,7 +1508,7 @@ SearchCatCacheList(CatCache *cache,
 									  nkeys,
 									  cur_skey);
 
-		/* The list will be ordered iff we are doing an index scan */
+		/* The list will be ordered if and only if we are doing an index scan */
 		ordered = (scandesc->irel != NULL);
 
 		while (HeapTupleIsValid(ntp = systable_getnext(scandesc)))
diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c
index a4ce716..30d30f5 100644
--- a/src/backend/utils/cache/lsyscache.c
+++ b/src/backend/utils/cache/lsyscache.c
@@ -51,7 +51,7 @@ get_attavgwidth_hook_type get_attavgwidth_hook = NULL;
 /*
  * op_in_opfamily
  *
- *		Return t iff operator 'opno' is in operator family 'opfamily'.
+ *		Return t if and only if operator 'opno' is in operator family 'opfamily'.
  *
  * This function only considers search operators, not ordering operators.
  */
diff --git a/src/backend/utils/mb/mbutils.c b/src/backend/utils/mb/mbutils.c
index 08440e9..4aa68bd 100644
--- a/src/backend/utils/mb/mbutils.c
+++ b/src/backend/utils/mb/mbutils.c
@@ -1022,7 +1022,7 @@ GetMessageEncoding(void)
 
 /*
  * Result is palloc'ed null-terminated utf16 string. The character length
- * is also passed to utf16len if not null. Returns NULL iff failed.
+ * is also passed to utf16len if not null. Returns NULL if and only if failed.
  */
 WCHAR *
 pgwin32_message_to_UTF16(const char *str, int len, int *utf16len)
diff --git a/src/backend/utils/mmgr/aset.c b/src/backend/utils/mmgr/aset.c
index 099200c..2e6696c 100644
--- a/src/backend/utils/mmgr/aset.c
+++ b/src/backend/utils/mmgr/aset.c
@@ -227,13 +227,13 @@ typedef struct AllocChunkData
 
 /*
  * AllocPointerIsValid
- *		True iff pointer is valid allocation pointer.
+ *		True if and only if pointer is valid allocation pointer.
  */
 #define AllocPointerIsValid(pointer) PointerIsValid(pointer)
 
 /*
  * AllocSetIsValid
- *		True iff set is valid allocation set.
+ *		True if and only if set is valid allocation set.
  */
 #define AllocSetIsValid(set) PointerIsValid(set)
 
diff --git a/src/backend/utils/time/tqual.c b/src/backend/utils/time/tqual.c
index f626755..6b48e21 100644
--- a/src/backend/utils/time/tqual.c
+++ b/src/backend/utils/time/tqual.c
@@ -137,7 +137,7 @@ HeapTupleSetHintBits(HeapTupleHeader tuple, Buffer buffer,
 
 /*
  * HeapTupleSatisfiesSelf
- *		True iff heap tuple is valid "for itself".
+ *		True if and only if heap tuple is valid "for itself".
  *
  *	Here, we consider the effects of:
  *		all committed transactions (as of the current instant)
@@ -336,7 +336,7 @@ HeapTupleSatisfiesAny(HeapTuple htup, Snapshot snapshot, Buffer buffer)
 
 /*
  * HeapTupleSatisfiesToast
- *		True iff heap tuple is valid as a TOAST row.
+ *		True if and only if heap tuple is valid as a TOAST row.
  *
  * This is a simplified version that only checks for VACUUM moving conditions.
  * It's appropriate for TOAST usage because TOAST really doesn't want to do
@@ -687,7 +687,7 @@ HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid,
 
 /*
  * HeapTupleSatisfiesDirty
- *		True iff heap tuple is valid including effects of open transactions.
+ *		True if and only if heap tuple is valid including effects of open transactions.
  *
  *	Here, we consider the effects of:
  *		all committed and in-progress transactions (as of the current instant)
@@ -886,7 +886,7 @@ HeapTupleSatisfiesDirty(HeapTuple htup, Snapshot snapshot,
 
 /*
  * HeapTupleSatisfiesMVCC
- *		True iff heap tuple is valid for the given MVCC snapshot.
+ *		True if and only if heap tuple is valid for the given MVCC snapshot.
  *
  *	Here, we consider the effects of:
  *		all transactions committed as of the time of the given snapshot
diff --git a/src/bin/pg_dump/parallel.c b/src/bin/pg_dump/parallel.c
index 6f2634b..a82c24d 100644
--- a/src/bin/pg_dump/parallel.c
+++ b/src/bin/pg_dump/parallel.c
@@ -753,7 +753,7 @@ GetIdleWorker(ParallelState *pstate)
 }
 
 /*
- * Return true iff every worker process is in the WRKR_TERMINATED state.
+ * Return true if and only if every worker process is in the WRKR_TERMINATED state.
  */
 static bool
 HasEveryWorkerTerminated(ParallelState *pstate)
@@ -767,7 +767,7 @@ HasEveryWorkerTerminated(ParallelState *pstate)
 }
 
 /*
- * Return true iff every worker is in the WRKR_IDLE state.
+ * Return true if and only if every worker is in the WRKR_IDLE state.
  */
 bool
 IsEveryWorkerIdle(ParallelState *pstate)
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index ebbb5b7..9107aa6 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -5249,7 +5249,7 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
 				 * If we found a constraint matching the index, create an
 				 * entry for it.
 				 *
-				 * In a pre-7.3 database, we take this path iff the index was
+				 * In a pre-7.3 database, we take this path if and only if the index was
 				 * marked indisprimary.
 				 */
 				constrinfo[j].dobj.objType = DO_CONSTRAINT;
@@ -9350,7 +9350,7 @@ dumpProcLang(Archive *fout, ProcLangInfo *plang)
 	 * dump it.
 	 *
 	 * However, for a language that belongs to an extension, we must not use
-	 * the shouldDumpProcLangs heuristic, but just dump the language iff we're
+	 * the shouldDumpProcLangs heuristic, but just dump the language if and only if we're
 	 * told to (via dobj.dump).  Generally the support functions will belong
 	 * to the same extension and so have the same dump flags ... if they
 	 * don't, this might not work terribly nicely.
@@ -10094,7 +10094,7 @@ dumpCast(Archive *fout, CastInfo *cast)
 	 * Builtin meaning, the namespace name does not start with "pg_".
 	 *
 	 * However, for a cast that belongs to an extension, we must not use this
-	 * heuristic, but just dump the cast iff we're told to (via dobj.dump).
+	 * heuristic, but just dump the cast if and only if we're told to (via dobj.dump).
 	 */
 	if (!cast->dobj.ext_member)
 	{
diff --git a/src/include/access/attnum.h b/src/include/access/attnum.h
index 50320d2..caa92cd 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 and only 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 and only if the attribute number corresponds to an user defined attribute.
  */
 #define AttrNumberIsForUserDefinedAttr(attributeNumber) \
 	((bool) ((attributeNumber) > 0))
diff --git a/src/include/access/genam.h b/src/include/access/genam.h
index a51f4c4..ccd57a5 100644
--- a/src/include/access/genam.h
+++ b/src/include/access/genam.h
@@ -118,7 +118,7 @@ typedef enum IndexUniqueCheck
 
 /*
  * IndexScanIsValid
- *		True iff the index scan is valid.
+ *		True if and only if the index scan is valid.
  */
 #define IndexScanIsValid(scan) PointerIsValid(scan)
 
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index bfdadc3..19e9afb 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -99,7 +99,7 @@ typedef struct HeapScanDescData *HeapScanDesc;
 
 /*
  * HeapScanIsValid
- *		True iff the heap scan is valid.
+ *		True if and only if the heap scan is valid.
  */
 #define HeapScanIsValid(scan) PointerIsValid(scan)
 
diff --git a/src/include/access/htup_details.h b/src/include/access/htup_details.h
index a3eba98..58feece 100644
--- a/src/include/access/htup_details.h
+++ b/src/include/access/htup_details.h
@@ -84,7 +84,7 @@
  * A word about t_ctid: whenever a new tuple is stored on disk, its t_ctid
  * is initialized with its own TID (location).	If the tuple is ever updated,
  * its t_ctid is changed to point to the replacement version of the tuple.
- * Thus, a tuple is the latest version of its row iff XMAX is invalid or
+ * Thus, a tuple is the latest version of its row if and only if XMAX is invalid or
  * t_ctid points to itself (in which case, if XMAX is valid, the tuple is
  * either locked or deleted).  One can follow the chain of t_ctid links
  * to find the newest version of the row.  Beware however that VACUUM might
diff --git a/src/include/access/sdir.h b/src/include/access/sdir.h
index ffc3142..ebd67c8 100644
--- a/src/include/access/sdir.h
+++ b/src/include/access/sdir.h
@@ -28,7 +28,7 @@ typedef enum ScanDirection
 
 /*
  * ScanDirectionIsValid
- *		True iff scan direction is valid.
+ *		True if and only if scan direction is valid.
  */
 #define ScanDirectionIsValid(direction) \
 	((bool) (BackwardScanDirection <= (direction) && \
@@ -36,21 +36,21 @@ typedef enum ScanDirection
 
 /*
  * ScanDirectionIsBackward
- *		True iff scan direction is backward.
+ *		True if and only if scan direction is backward.
  */
 #define ScanDirectionIsBackward(direction) \
 	((bool) ((direction) == BackwardScanDirection))
 
 /*
  * ScanDirectionIsNoMovement
- *		True iff scan direction indicates no movement.
+ *		True if and only if scan direction indicates no movement.
  */
 #define ScanDirectionIsNoMovement(direction) \
 	((bool) ((direction) == NoMovementScanDirection))
 
 /*
  * ScanDirectionIsForward
- *		True iff scan direction is forward.
+ *		True if and only if scan direction is forward.
  */
 #define ScanDirectionIsForward(direction) \
 	((bool) ((direction) == ForwardScanDirection))
diff --git a/src/include/c.h b/src/include/c.h
index 30b8f51..456e171 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -464,19 +464,19 @@ typedef NameData *Name;
  */
 /*
  * BoolIsValid
- *		True iff bool is valid.
+ *		True if and only if bool is valid.
  */
 #define BoolIsValid(boolean)	((boolean) == false || (boolean) == true)
 
 /*
  * PointerIsValid
- *		True iff pointer is valid.
+ *		True if and only if pointer is valid.
  */
 #define PointerIsValid(pointer) ((const void*)(pointer) != NULL)
 
 /*
  * PointerIsAligned
- *		True iff pointer is properly aligned to point to the given type.
+ *		True if and only if pointer is properly aligned to point to the given type.
  */
 #define PointerIsAligned(pointer, type) \
 		(((uintptr_t)(pointer) % (sizeof (type))) == 0)
diff --git a/src/include/lib/binaryheap.h b/src/include/lib/binaryheap.h
index 8f83c23..569278b 100644
--- a/src/include/lib/binaryheap.h
+++ b/src/include/lib/binaryheap.h
@@ -12,8 +12,8 @@
 #define BINARYHEAP_H
 
 /*
- * For a max-heap, the comparator must return <0 iff a < b, 0 iff a == b,
- * and >0 iff a > b.  For a min-heap, the conditions are reversed.
+ * For a max-heap, the comparator must return <0 if and only if a < b, 0 if and only if a == b,
+ * and >0 if and only if a > b.  For a min-heap, the conditions are reversed.
  */
 typedef int (*binaryheap_comparator) (Datum a, Datum b, void *arg);
 
diff --git a/src/include/nodes/memnodes.h b/src/include/nodes/memnodes.h
index f79ebd4..b398439 100644
--- a/src/include/nodes/memnodes.h
+++ b/src/include/nodes/memnodes.h
@@ -67,7 +67,7 @@ typedef struct MemoryContextData
 
 /*
  * MemoryContextIsValid
- *		True iff memory context is valid.
+ *		True if and only if memory context is valid.
  *
  * Add new context types to the set accepted by this macro.
  */
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index ad58b39..51c9ed2 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -1574,7 +1574,7 @@ typedef struct CreateStmt
  *
  * If skip_validation is true then we skip checking that the existing rows
  * in the table satisfy the constraint, and just install the catalog entries
- * for the constraint.	A new FK constraint is marked as valid iff
+ * for the constraint.	A new FK constraint is marked as valid if and only if
  * initially_valid is true.  (Usually skip_validation and initially_valid
  * are inverses, but we can set both true if the table is known empty.)
  *
diff --git a/src/include/pgstat.h b/src/include/pgstat.h
index 0b458e5..e432247 100644
--- a/src/include/pgstat.h
+++ b/src/include/pgstat.h
@@ -674,7 +674,7 @@ typedef struct PgBackendStatus
 	 */
 	int			st_changecount;
 
-	/* The entry is valid iff st_procpid > 0, unused if st_procpid == 0 */
+	/* The entry is valid if and only if st_procpid > 0, unused if st_procpid == 0 */
 	int			st_procpid;
 
 	/* Times when current backend, transaction, and activity started */
diff --git a/src/include/storage/block.h b/src/include/storage/block.h
index bc503cf..7c05363 100644
--- a/src/include/storage/block.h
+++ b/src/include/storage/block.h
@@ -65,14 +65,14 @@ typedef BlockIdData *BlockId;	/* block identifier */
 
 /*
  * BlockNumberIsValid
- *		True iff blockNumber is valid.
+ *		True if and only if blockNumber is valid.
  */
 #define BlockNumberIsValid(blockNumber) \
 	((bool) ((BlockNumber) (blockNumber) != InvalidBlockNumber))
 
 /*
  * BlockIdIsValid
- *		True iff the block identifier is valid.
+ *		True if and only if the block identifier is valid.
  */
 #define BlockIdIsValid(blockId) \
 	((bool) PointerIsValid(blockId))
diff --git a/src/include/storage/buf.h b/src/include/storage/buf.h
index f1f8801..e676f03 100644
--- a/src/include/storage/buf.h
+++ b/src/include/storage/buf.h
@@ -26,13 +26,13 @@ typedef int Buffer;
 
 /*
  * BufferIsInvalid
- *		True iff the buffer is invalid.
+ *		True if and only if the buffer is invalid.
  */
 #define BufferIsInvalid(buffer) ((buffer) == InvalidBuffer)
 
 /*
  * BufferIsLocal
- *		True iff the buffer is local (not visible to other backends).
+ *		True if and only if the buffer is local (not visible to other backends).
  */
 #define BufferIsLocal(buffer)	((buffer) < 0)
 
diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h
index 89447d0..924faa6 100644
--- a/src/include/storage/bufmgr.h
+++ b/src/include/storage/bufmgr.h
@@ -78,7 +78,7 @@ extern PGDLLIMPORT int32 *LocalRefCount;
 
 /*
  * BufferIsValid
- *		True iff the given buffer number is valid (either as a shared
+ *		True if and only if the given buffer number is valid (either as a shared
  *		or local buffer).
  *
  * Note: For a long time this was defined the same as BufferIsPinned,
@@ -103,7 +103,7 @@ extern PGDLLIMPORT int32 *LocalRefCount;
 
 /*
  * BufferIsPinned
- *		True iff the buffer is pinned (also checks for valid buffer number).
+ *		True if and only if the buffer is pinned (also checks for valid buffer number).
  *
  *		NOTE: what we check here is that *this* backend holds a pin on
  *		the buffer.  We do not care whether some other backend does.
diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h
index c222c32..d4d2569 100644
--- a/src/include/storage/bufpage.h
+++ b/src/include/storage/bufpage.h
@@ -203,7 +203,7 @@ typedef PageHeaderData *PageHeader;
 
 /*
  * PageIsValid
- *		True iff page is valid.
+ *		True if and only if page is valid.
  */
 #define PageIsValid(page) PointerIsValid(page)
 
@@ -214,14 +214,14 @@ typedef PageHeaderData *PageHeader;
 
 /*
  * PageIsEmpty
- *		returns true iff no itemid has been allocated on the page
+ *		returns true if and only if no itemid has been allocated on the page
  */
 #define PageIsEmpty(page) \
 	(((PageHeader) (page))->pd_lower <= SizeOfPageHeaderData)
 
 /*
  * PageIsNew
- *		returns true iff page has not been initialized (by PageInit)
+ *		returns true if and only if page has not been initialized (by PageInit)
  */
 #define PageIsNew(page) (((PageHeader) (page))->pd_upper == 0)
 
@@ -250,7 +250,7 @@ typedef PageHeaderData *PageHeader;
 
 /*
  * PageSizeIsValid
- *		True iff the page size is valid.
+ *		True if and only if the page size is valid.
  */
 #define PageSizeIsValid(pageSize) ((pageSize) == BLCKSZ)
 
diff --git a/src/include/storage/itemid.h b/src/include/storage/itemid.h
index a91cf97..bb4f91f 100644
--- a/src/include/storage/itemid.h
+++ b/src/include/storage/itemid.h
@@ -79,42 +79,42 @@ typedef uint16 ItemLength;
 
 /*
  * ItemIdIsValid
- *		True iff item identifier is valid.
+ *		True if and only if item identifier is valid.
  *		This is a pretty weak test, probably useful only in Asserts.
  */
 #define ItemIdIsValid(itemId)	PointerIsValid(itemId)
 
 /*
  * ItemIdIsUsed
- *		True iff item identifier is in use.
+ *		True if and only if item identifier is in use.
  */
 #define ItemIdIsUsed(itemId) \
 	((itemId)->lp_flags != LP_UNUSED)
 
 /*
  * ItemIdIsNormal
- *		True iff item identifier is in state NORMAL.
+ *		True if and only if item identifier is in state NORMAL.
  */
 #define ItemIdIsNormal(itemId) \
 	((itemId)->lp_flags == LP_NORMAL)
 
 /*
  * ItemIdIsRedirected
- *		True iff item identifier is in state REDIRECT.
+ *		True if and only if item identifier is in state REDIRECT.
  */
 #define ItemIdIsRedirected(itemId) \
 	((itemId)->lp_flags == LP_REDIRECT)
 
 /*
  * ItemIdIsDead
- *		True iff item identifier is in state DEAD.
+ *		True if and only if item identifier is in state DEAD.
  */
 #define ItemIdIsDead(itemId) \
 	((itemId)->lp_flags == LP_DEAD)
 
 /*
  * ItemIdHasStorage
- *		True iff item identifier has associated storage.
+ *		True if and only if item identifier has associated storage.
  */
 #define ItemIdHasStorage(itemId) \
 	((itemId)->lp_len != 0)
diff --git a/src/include/storage/itemptr.h b/src/include/storage/itemptr.h
index 67bbdbb..883e84a 100644
--- a/src/include/storage/itemptr.h
+++ b/src/include/storage/itemptr.h
@@ -57,7 +57,7 @@ typedef ItemPointerData *ItemPointer;
 
 /*
  * ItemPointerIsValid
- *		True iff the disk item pointer is not NULL.
+ *		True if and only if the disk item pointer is not NULL.
  */
 #define ItemPointerIsValid(pointer) \
 	((bool) (PointerIsValid(pointer) && ((pointer)->ip_posid != 0)))
diff --git a/src/include/storage/off.h b/src/include/storage/off.h
index 80d2b77..15e4eab 100644
--- a/src/include/storage/off.h
+++ b/src/include/storage/off.h
@@ -35,7 +35,7 @@ typedef uint16 OffsetNumber;
 
 /*
  * OffsetNumberIsValid
- *		True iff the offset number is valid.
+ *		True if and only if the offset number is valid.
  */
 #define OffsetNumberIsValid(offsetNumber) \
 	((bool) ((offsetNumber != InvalidOffsetNumber) && \
diff --git a/src/include/storage/pos.h b/src/include/storage/pos.h
index bc41502..8b70966 100644
--- a/src/include/storage/pos.h
+++ b/src/include/storage/pos.h
@@ -35,7 +35,7 @@ typedef PositionIdData *PositionId;
 
 /*
  * PositionIdIsValid
- *		True iff the position identifier is valid.
+ *		True if and only if the position identifier is valid.
  */
 #define PositionIdIsValid(positionId) \
 	PointerIsValid(positionId)
diff --git a/src/include/utils/portal.h b/src/include/utils/portal.h
index 0506bde..fd5e965 100644
--- a/src/include/utils/portal.h
+++ b/src/include/utils/portal.h
@@ -179,7 +179,7 @@ typedef struct PortalData
 
 /*
  * PortalIsValid
- *		True iff portal is valid.
+ *		True if and only if portal is valid.
  */
 #define PortalIsValid(p) PointerIsValid(p)
 
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index 9b8a4c9..ab63093 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -297,7 +297,7 @@ typedef struct StdRdOptions
 
 /*
  * RelationIsValid
- *		True iff relation descriptor is valid.
+ *		True if and only if relation descriptor is valid.
  */
 #define RelationIsValid(relation) PointerIsValid(relation)
 
@@ -305,7 +305,7 @@ typedef struct StdRdOptions
 
 /*
  * RelationHasReferenceCountZero
- *		True iff relation reference count is zero.
+ *		True if and only if relation reference count is zero.
  *
  * Note:
  *		Assumes relation descriptor is valid.
diff --git a/src/include/utils/tqual.h b/src/include/utils/tqual.h
index e34c28a..349d018 100644
--- a/src/include/utils/tqual.h
+++ b/src/include/utils/tqual.h
@@ -41,7 +41,7 @@ extern PGDLLIMPORT SnapshotData SnapshotToastData;
 
 /*
  * HeapTupleSatisfiesVisibility
- *		True iff heap tuple satisfies a time qual.
+ *		True if and only if heap tuple satisfies a time qual.
  *
  * Notes:
  *	Assumes heap tuple is valid.
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c
index a81c185..ffc682d 100644
--- a/src/pl/plperl/plperl.c
+++ b/src/pl/plperl/plperl.c
@@ -672,7 +672,7 @@ activate_interpreter(plperl_interp_desc *interp_desc)
 	{
 		Assert(interp_desc->interp);
 		PERL_SET_CONTEXT(interp_desc->interp);
-		/* trusted iff user_id isn't InvalidOid */
+		/* trusted if and only if user_id isn't InvalidOid */
 		set_interp_require(OidIsValid(interp_desc->user_id));
 		plperl_active_interp = interp_desc;
 	}
@@ -848,7 +848,7 @@ plperl_init_interp(void)
  * This is safe because it's completely unable to load any code.
  * If the requested file/module has already been loaded it'll return true.
  * If not, it'll die.
- * So now "use Foo;" will work iff Foo has already been loaded.
+ * So now "use Foo;" will work if and only if Foo has already been loaded.
  */
 static OP  *
 pp_require_safe(pTHX)
diff --git a/src/pl/plperl/ppport.h b/src/pl/plperl/ppport.h
index 5ea0c66..55c0d44 100644
--- a/src/pl/plperl/ppport.h
+++ b/src/pl/plperl/ppport.h
@@ -6642,7 +6642,7 @@ DPPP_(my_grok_oct)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *resul
                 goto redo;
 	    }
         /* Allow \octal to work the DWIM way (that is, stop scanning
-         * as soon as non-octal characters are seen, complain only iff
+         * as soon as non-octal characters are seen, complain only if and only if
          * someone seems to want to use the digits eight and nine). */
         if (digit == 8 || digit == 9) {
             if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index 3749fac..30878c7 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -2125,7 +2125,7 @@ exec_stmt_forc(PLpgSQL_execstate *estate, PLpgSQL_stmt_forc *stmt)
 	 * Open the cursor just like an OPEN command
 	 *
 	 * Note: parser should already have checked that statement supplies
-	 * args iff cursor needs them, but we check again to be safe.
+	 * args if and only if cursor needs them, but we check again to be safe.
 	 * ----------
 	 */
 	if (stmt->argquery != NULL)
@@ -3773,7 +3773,7 @@ exec_stmt_open(PLpgSQL_execstate *estate, PLpgSQL_stmt_open *stmt)
 		 * This is an OPEN cursor
 		 *
 		 * Note: parser should already have checked that statement supplies
-		 * args iff cursor needs them, but we check again to be safe.
+		 * args if and only if cursor needs them, but we check again to be safe.
 		 * ----------
 		 */
 		if (stmt->argquery != NULL)
diff --git a/src/test/regress/expected/opr_sanity.out b/src/test/regress/expected/opr_sanity.out
index 26abe8a..90cf2d0 100644
--- a/src/test/regress/expected/opr_sanity.out
+++ b/src/test/regress/expected/opr_sanity.out
@@ -73,7 +73,7 @@ WHERE proiswindow AND (proisagg OR proretset);
 -----+---------
 (0 rows)
 
--- pronargdefaults should be 0 iff proargdefaults is null
+-- pronargdefaults should be 0 if and only if proargdefaults is null
 SELECT p1.oid, p1.proname
 FROM pg_proc AS p1
 WHERE (pronargdefaults <> 0) != (proargdefaults IS NOT NULL);
diff --git a/src/test/regress/expected/type_sanity.out b/src/test/regress/expected/type_sanity.out
index 3616c8d..1778e61 100644
--- a/src/test/regress/expected/type_sanity.out
+++ b/src/test/regress/expected/type_sanity.out
@@ -482,7 +482,7 @@ WHERE p1.rngtypid = 0 OR p1.rngsubtype = 0 OR p1.rngsubopc = 0;
 ----------+------------
 (0 rows)
 
--- rngcollation should be specified iff subtype is collatable
+-- rngcollation should be specified if and only if subtype is collatable
 SELECT p1.rngtypid, p1.rngsubtype, p1.rngcollation, t.typcollation
 FROM pg_range p1 JOIN pg_type t ON t.oid = p1.rngsubtype
 WHERE (rngcollation = 0) != (typcollation = 0);
diff --git a/src/test/regress/sql/opr_sanity.sql b/src/test/regress/sql/opr_sanity.sql
index 40e1be2..75f88b9 100644
--- a/src/test/regress/sql/opr_sanity.sql
+++ b/src/test/regress/sql/opr_sanity.sql
@@ -71,7 +71,7 @@ SELECT p1.oid, p1.proname
 FROM pg_proc AS p1
 WHERE proiswindow AND (proisagg OR proretset);
 
--- pronargdefaults should be 0 iff proargdefaults is null
+-- pronargdefaults should be 0 if and only if proargdefaults is null
 SELECT p1.oid, p1.proname
 FROM pg_proc AS p1
 WHERE (pronargdefaults <> 0) != (proargdefaults IS NOT NULL);
diff --git a/src/test/regress/sql/type_sanity.sql b/src/test/regress/sql/type_sanity.sql
index 14cb540..19d89a6 100644
--- a/src/test/regress/sql/type_sanity.sql
+++ b/src/test/regress/sql/type_sanity.sql
@@ -360,7 +360,7 @@ SELECT p1.rngtypid, p1.rngsubtype
 FROM pg_range as p1
 WHERE p1.rngtypid = 0 OR p1.rngsubtype = 0 OR p1.rngsubopc = 0;
 
--- rngcollation should be specified iff subtype is collatable
+-- rngcollation should be specified if and only if subtype is collatable
 
 SELECT p1.rngtypid, p1.rngsubtype, p1.rngcollation, t.typcollation
 FROM pg_range p1 JOIN pg_type t ON t.oid = p1.rngsubtype
#8Heikki Linnakangas
hlinnakangas@vmware.com
In reply to: David Fetter (#7)
Re: Fix comment typo in /src/backend/command/cluster.c

On 01/28/2014 08:58 AM, David Fetter wrote:

On Tue, Jan 28, 2014 at 02:51:22PM +0900, Michael Paquier wrote:

On Tue, Jan 28, 2014 at 2:29 PM, David Fetter <david@fetter.org> wrote:

On Tue, Jan 28, 2014 at 04:48:35PM +1300, Gavin Flower wrote:

I came across that abbreviation in a first years Maths course
"Principles of Mathematics" in 1968 at the University of Auckland..

By my rough count (ack -l '\biff\b' |wc -l), it's used to mean
equivalence 81 times in the source tree. Should we have a glossary of
such terms?

And what about directly replacing those expressions in the comments of
the code with some more understandable language? This would be more
suited for non-native English speakers than maintaining a glossary
that you can surely find here and there after some googling.

I'm interested to find 29 instances of "if and only if" in the source,
which should be the same thing.

Please find attached a mechanically done patch which expands the
remaining instances of "iff" to the longer form, all of which are in
comments. The patched source passes make -j8, but I have not tested
it further.

"iff" is well-known abbreviation, I don't see a need to expunge it from
the source code. There might be places where some other wording or
spelling it out as "if and only if" would be better, but a mechanical
search/replace is not warranted.

FWIW, many other languages use a similar abbreviation for the same
thing, so it's not impossible for a non-native English speaker with
basic math education to guess. In Finnish, it's "joss", which stands for
"jos ja vain jos", and a quick look at Wikipedia shows a similar
construct in many other languages.

- Heikki

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