"=?gb18030?B?0e7S3bTm?=" <1057206...@qq.com> writes: > 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.
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]. 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