Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] The persistance of C functions

From: "Ross J(dot) Reedstrom" <reedstrm(at)wallace(dot)ece(dot)rice(dot)edu>
To: Karel Zak - Zakkr <zakkr(at)zf(dot)jcu(dot)cz>
Cc: Bryan White <bryan(at)arcamax(dot)com>, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] The persistance of C functions
Date: 2000-02-10 16:34:50
Message-ID: 20000210103450.A8610@rice.edu (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfaces
On Thu, Feb 10, 2000 at 10:42:29AM +0100, Karel Zak - Zakkr wrote:
> 
> On Wed, 9 Feb 2000, Bryan White wrote:
> 
> > If I use CREATE FUNCTION for a C function in a .so file and then use the
> > function and then change and recompile the function, what steps are needed
> > to see the change?
> > 
> > As I see it the options are:
> > A: do nothing, the function is reloaded on every invocation.
> > B: Reopen the connection to the backend
> > C: Restart the postmaster
> > 
> > I suspect B is correct but I would like to hear someone confirm it.
> 
> 
>  'B' is right - the postgreSQL not has any persisten cache for this, and 
> if you restart connection a backend reload this information again.
> 
> Or you can drop/(re)create a function, it is total safe solution.


Not _totally_ safe: if you've got anything that refers to that function,
like a user defined type definition, drop/(re)create will change the
function's oid in the pg_proc table, causing errors when the old
function is looked up. Hmm, an ALTER FUNCTION command might be nice...

Ross
-- 
Ross J. Reedstrom, Ph.D., <reedstrm(at)rice(dot)edu> 
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St.,  Houston, TX 77005

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2000-02-10 16:48:15
Subject: Solution for LIMIT cost estimation
Previous:From: Thomas LockhartDate: 2000-02-10 16:30:45
Subject: Re: [HACKERS] createdb default arguments

pgsql-interfaces by date

Next:From: Brian PiatkusDate: 2000-02-10 17:18:27
Subject: ODBC Declare/fetch & VB
Previous:From: Peter MountDate: 2000-02-10 16:24:52
Subject: RE: [INTERFACES] JDBC primary keys

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group