Re: heap_create_with_catalog comments

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: heap_create_with_catalog comments
Date: 2026-01-20 06:23:55
Message-ID: 56DAE104-B4FC-454B-A843-FA18642CCA4C@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Jan 16, 2026, at 17:52, jian he <jian(dot)universality(at)gmail(dot)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/

In response to

Browse pgsql-hackers by date

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