Re: How to add our functions in postgres

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: sandeep satpal <sandeep(at)it(dot)iitb(dot)ac(dot)in>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: How to add our functions in postgres
Date: 2005-11-30 06:11:15
Message-ID: 20051130061113.GA23691@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 <kleptog(at)svana(dot)org> 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2005-11-30 06:18:41 Re: slow IN() clause for many cases
Previous Message sandeep satpal 2005-11-30 05:10:42 How to add our functions in postgres