Re: heap_create_with_catalog comments - Mailing list pgsql-hackers

From Chao Li
Subject Re: heap_create_with_catalog comments
Date
Msg-id 56DAE104-B4FC-454B-A843-FA18642CCA4C@gmail.com
Whole thread Raw
In response to heap_create_with_catalog comments  (jian he <jian.universality@gmail.com>)
List pgsql-hackers

> On Jan 16, 2026, at 17:52, jian he <jian.universality@gmail.com> 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/







pgsql-hackers by date:

Previous
From: Zsolt Parragi
Date:
Subject: Re: Patch: dumping tables data in multiple chunks in pg_dump
Next
From: Mahendra Singh Thalor
Date:
Subject: Re: getting "shell command argument contains a newline or carriage return:" error with pg_dumpall when db name have new line in double quote