Possibly a typo in expand_inherited_rtentry()

Started by Amit Langotealmost 11 years ago3 messages
#1Amit Langote
Langote_Amit_f8@lab.ntt.co.jp
1 attachment(s)

Hi,

Attached does:

Index childRTindex;
AppendRelInfo *appinfo;

-    /* Open rel if needed; we already have required locks */
+    /* Open rel if needed; we already have acquired locks */
     if (childOID != parentOID)
         newrelation = heap_open(childOID, NoLock);
     else

Does that make sense?

Thanks,
Amit

Attachments:

comment-typo.patchtext/x-diff; name=comment-typo.patchDownload
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c
index 51b3da2..b0cb818 100644
--- a/src/backend/optimizer/prep/prepunion.c
+++ b/src/backend/optimizer/prep/prepunion.c
@@ -1317,7 +1317,7 @@ expand_inherited_rtentry(PlannerInfo *root, RangeTblEntry *rte, Index rti)
 		Index		childRTindex;
 		AppendRelInfo *appinfo;
 
-		/* Open rel if needed; we already have required locks */
+		/* Open rel if needed; we already have acquired locks */
 		if (childOID != parentOID)
 			newrelation = heap_open(childOID, NoLock);
 		else
#2Amit Langote
Langote_Amit_f8@lab.ntt.co.jp
In reply to: Amit Langote (#1)
Re: Possibly a typo in expand_inherited_rtentry()

On 03-04-2015 PM 03:58, Amit Langote wrote:

Index childRTindex;
AppendRelInfo *appinfo;

-    /* Open rel if needed; we already have required locks */
+    /* Open rel if needed; we already have acquired locks */
if (childOID != parentOID)
newrelation = heap_open(childOID, NoLock);

Though, it may be that "required" is to imply "acquired".

Thanks,
Amit

--
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: Amit Langote (#1)
Re: Possibly a typo in expand_inherited_rtentry()

Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> writes:

Attached does:
-    /* Open rel if needed; we already have required locks */
+    /* Open rel if needed; we already have acquired locks */

Does that make sense?

No, not particularly. It could be made to say "the locks we require"
but I don't find anything wrong with the existing wording (and I'll
bet there is similar wording in many other places).

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