Re: Error in executing user defined function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Error in executing user defined function
Date
Msg-id 9020.1015699081@sss.pgh.pa.us
Whole thread Raw
In response to Error in executing user defined function  (Amit Kumar Khare <skamit2000@yahoo.com>)
List pgsql-hackers
Amit Kumar Khare <skamit2000@yahoo.com> writes:
> (2) Then I made the following entry in pg_proc.h
> DATA(insert OID = 4000 (  MyInc            PGUID 12 f t t t 1 f
> 23 "23" 100 0 0 100  MyInc testfunc ));
> DESCR("test function ");

I think you ignored the advice that appears at the head of pg_proc.h
(and all the other include/catalog headers):
*      XXX do NOT break up DATA() statements into multiple lines!*          the scripts are not as smart as you might
think...*     XXX (eg. #if 0 #endif won't do what you think)
 

> PROBLEM 3:

> I didn't get a way to reflect all the new DATA()
> entries in pg_proc.h to pg_proc system table without
> deleting the "data" directory and reinitializing it
> again by running "initdb".

Quite.  CREATE FUNCTION is the usual way of creating new pg_proc entries
on-the-fly.  The include/catalog files contain exactly those entries
that are inserted by initdb; there is no other path from them to the
running system.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] Small fix for _equalValue()
Next
From: Tom Lane
Date:
Subject: Rationalizing EXPLAIN VERBOSE output