Re: How to add built-in func? - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: How to add built-in func?
Date
Msg-id CAFj8pRAKPqV81+cc+PcNZVnn=jW1bLRUPrvzj0gzS62hnQ7PmQ@mail.gmail.com
Whole thread Raw
In response to How to add built-in func?  (jacktby jacktby <jacktby@gmail.com>)
Responses Re: How to add built-in func?
List pgsql-hackers
Hi

po 11. 9. 2023 v 17:59 odesílatel jacktby jacktby <jacktby@gmail.com> napsal:
I only add below:

Datum fake_dinstance2(PG_FUNCTION_ARGS)
{
        PG_RETURN_INT16(0);
}
in src/backend/utils/adt/int8.c, and the I run “make install”,
But I can’t find the fake_distance2 in src/backend/utils/fmgrtab.c which is
generated by src/backend/utils/Gen_fmgrtab.pl.  What else do I need to add?

you need to add the function metadata to pg_proc.dat

For free oid use unused_oids script

Regards

Pavel

pgsql-hackers by date:

Previous
From: Isaac Morland
Date:
Subject: Re: Possibility to disable `ALTER SYSTEM`
Next
From: Pavel Stehule
Date:
Subject: Re: How to add built-in func?