Inquiries about PostgreSQL's system catalog development——from a student developer of Nanjing University

Started by 杨逸存almost 5 years ago3 messages
#1杨逸存
1057206466@qq.com

Dear hacker:
    I am a Nanjing University student, Yang. I have forked a newly version of PostgreSQL source code to develop for my own use. Her is my question: I am trying to add a new system catalog to the system backend, how can I reach it? Is there any code or interface demonstration to show me?
    I am looking forward to your prompt reply. Heartfelt thanks.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: 杨逸存 (#1)
Re: Inquiries about PostgreSQL's system catalog development——from a student developer of Nanjing University

"=?gb18030?B?0e7S3bTm?=" <1057206466@qq.com> writes:

&nbsp; &nbsp; I am a Nanjing University student, Yang. I have forked a newly version of PostgreSQL source code to develop for my own use. Her is my question: I am trying to add a new system catalog to the system backend, how can I reach it? Is there any code or interface demonstration to show me?
&nbsp; &nbsp; I am looking forward to your prompt reply. Heartfelt thanks.

You could try looking through the git history to find past commits
that added new system catalogs, and see what they did. Of course
there will be lots of details that are specific to the actual purpose
of the new catalog, but this might be a useful guide anyway.

One point to know, if you are studying any such commit that is more
than a couple of years old, is that we have completely redesigned the
way that initial catalog data is represented. Fortunately, that's
also documented now [1]https://www.postgresql.org/docs/devel/bki.html.

In general, studying the existing code to look for prototypes to copy
is a good approach.

regards, tom lane

[1]: https://www.postgresql.org/docs/devel/bki.html

#3Japin Li
japinli@hotmail.com
In reply to: 杨逸存 (#1)
Re: Inquiries about PostgreSQL's system catalog development——from a student developer of Nanjing University

On Sat, 06 Mar 2021 at 17:01, 杨逸存 <1057206466@qq.com> wrote:

Dear hacker:
&nbsp; &nbsp; I am a Nanjing University student, Yang. I have forked a newly version of PostgreSQL source code to develop for my own use. Her is my question: I am trying to add a new system catalog to the system backend, how can I reach it? Is there any code or interface demonstration to show me?
&nbsp; &nbsp; I am looking forward to your prompt reply. Heartfelt thanks.

Here is a document on how to create a new system catalog for PostgreSQL 11.

https://blog.japinli.top/2019/08/postgresql-new-catalog/

--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.