Subject: Re: heap_create_with_catalog comments

From: Chao Li <[email-masked]>
Date: Tue, 20 Jan 2026 14:23:55 +0800

> On Jan 16, 2026, at 17:52, jian he <[email-masked]> wrote:
> 
> hi.
> 
> function heap_create_with_catalog, comments:
> 
> /* --------------------------------
> *        heap_create_with_catalog
> *
> *        creates a new cataloged relation.  see comments above.
> 
> it should be "see comments below."?
> 

I think “above” is correct, that should refer to line 409:

```
/* ----------------------------------------------------------------
* heap_create_with_catalog - Create a cataloged relation
*
* this is done in multiple steps:
*
* 1) CheckAttributeNamesTypes() is used to make certain the tuple
* descriptor contains a valid set of attribute names and types
*
* 2) pg_class is opened and get_relname_relid()
* performs a scan to ensure that no relation with the
* same name already exists.
*
* 3) heap_create() is called to create the new relation on disk.
*
* 4) TypeCreate() is called to define a new type corresponding
* to the new relation.
*
* 5) AddNewRelationTuple() is called to register the
* relation in pg_class.
*
* 6) AddNewAttributeTuples() is called to register the
* new relation's schema in pg_attribute.
*
* 7) StoreConstraints() is called - vadim 08/22/97
*
* 8) the relations are closed and the new relation's oid
* is returned.
*
* ----------------------------------------------------------------
```

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/