Fix typo in src/backend/utils/cache/lsyscache.c

Started by Hou, Zhijieabout 5 years ago2 messages
#1Hou, Zhijie
houzj.fnst@cn.fujitsu.com
1 attachment(s)

Hi

I found the comment of function get_attgenerated(Oid relid, AttrNumber attnum) seems wrong.
It seems the function is given the attribute number not the name.

/*
  * get_attgenerated
  *
- *		Given the relation id and the attribute name,
+ *		Given the relation id and the attribute number,
  *		return the "attgenerated" field from the attribute relation.
  *
  *		Errors if not found.

Best regards,
houzj

Attachments:

0001-fix-typo.patchapplication/octet-stream; name=0001-fix-typo.patchDownload
From 823071301f7a45936b50b130be6847f24666d495 Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Sun, 25 Oct 2020 05:15:31 -0400
Subject: [PATCH] fix typo

---
 src/backend/utils/cache/lsyscache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c
index f3bf413..1403390 100644
--- a/src/backend/utils/cache/lsyscache.c
+++ b/src/backend/utils/cache/lsyscache.c
@@ -874,7 +874,7 @@ get_attnum(Oid relid, const char *attname)
 /*
  * get_attgenerated
  *
- *		Given the relation id and the attribute name,
+ *		Given the relation id and the attribute number,
  *		return the "attgenerated" field from the attribute relation.
  *
  *		Errors if not found.
-- 
1.8.3.1

#2David Rowley
dgrowleyml@gmail.com
In reply to: Hou, Zhijie (#1)
Re: Fix typo in src/backend/utils/cache/lsyscache.c

On Sun, 25 Oct 2020 at 14:23, Hou, Zhijie <houzj.fnst@cn.fujitsu.com> wrote:

I found the comment of function get_attgenerated(Oid relid, AttrNumber attnum) seems wrong.
It seems the function is given the attribute number not the name.

Thanks. Pushed.

David