On 09.07.25 01:28, Michael Paquier wrote:
On Tue, Jul 08, 2025 at 05:40:39PM +0300, Florents Tselai wrote:
On Tue, Jul 1, 2025 at 12:25 PM Peter Eisentraut <pe...@eisentraut.org> wrote:
+
+Below are some checklists for common scenarios.
+
+## Adding a New Built-in SQL Command
+
+1. Implement the function in C and place it in the appropriate
directory under `src` (typically in `src/utils/adt`)
+2. Each function should have a unique integer OID. Run the script
`src/include/catalog/unused_oids` to find available ranges.
+3. Add the entry to `pg_proc.dat` following the surrounding
conventions.

Presumably, if you're developing this kind of thing, you are already
reading some other part of the documentation, maybe xfunc.sgml?  Do we
need to add more information there, or some links?

I agree. Added a link reference to that xfunc-c

I understand Peter's comment that we need something more general than
what your v2-0001 is proposing, the point being that modifying
pg_proc.dat may apply to some concepts, but it's far from being all of
them.  If you need to add a new in-core type, or something else to a
different catalog, then you need to be aware of a completely different
.dat file.  This set of instructions read as being a bit misleading,
IMO.

I have committed the part that adds a link to the bki documentation.

I think the other parts, like how to add a new built-in function, didn't have consensus. Maybe a wiki page or a blog post could be good forums for that.



Reply via email to