How to add our functions in postgres
How to add our functions in postgres
От:
sandeep satpal <sandeep@it.iitb.ac.in>
Дата:
Hi, I have to add a function in varlena.c named btcasecmp(PG_FUNCTION_ARG) , so what other information I have to add in source. I know little bit of it, I have added that function in src/backend/utils/fmgrtab.c and assign a new oid but when I installed that function definition is not appearing in the table "pg_amproc", So I want to know what other information I have to add so that I can call my function using oid. Thanks and regards, Sandeep -- ------------------ | Sandeep Satpal | | M.Tech Student | | Lab 212 KReSIT | ------------------
Re: How to add our functions in postgres
От:
Martijn van Oosterhout <kleptog@svana.org>
Дата:
On Wed, Nov 30, 2005 at 10:40:42AM +0530, sandeep satpal wrote: > > Hi, > I have to add a function in varlena.c named > btcasecmp(PG_FUNCTION_ARG) , > so what other information I have to add in source. > I know little bit of it, > I have added that function in > src/backend/utils/fmgrtab.c and assign a new oid but when I installed that > function definition is not appearing in the table "pg_amproc", > So I want to know what other information I have to add so that I can call > my function using oid. Is that the file with in large friendly letters says: DO NOT EDIT THIS FILE! It says: It has been GENERATED by Gen_fmgrtab.sh from ../../../src/include/catalog/pg_proc.h So you need to add it to src/include/catalog/pg_proc.h Obviously if you want it to appear in pg_amproc you probably also want to change src/include/catalog/pg_amproc.h Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them.