Re: How to add built-in func?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: jacktby jacktby <jacktby(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: How to add built-in func?
Date: 2023-09-11 16:19:49
Message-ID: CAFj8pRBn+f_WuFv3f8cj48yyNH9vP=htn+7gxYZFtTz37_VEvg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

po 11. 9. 2023 v 18:18 odesílatel Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
napsal:

> Hi
>
> po 11. 9. 2023 v 17:59 odesílatel jacktby jacktby <jacktby(at)gmail(dot)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
>

https://www.postgresql.org/docs/current/system-catalog-initial-data.html

https://www.highgo.ca/2021/03/04/how-to-create-a-system-information-function-in-postgresql/

> Regards
>
> Pavel
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message jacktby jacktby 2023-09-11 16:28:05 Re: How to add built-in func?
Previous Message Pavel Stehule 2023-09-11 16:18:28 Re: How to add built-in func?