AW: [HACKERS] livetime of a variable defined in a c-procedure (fw d) - Mailing list pgsql-hackers

From ZEUGSWETTER Andreas IZ5
Subject AW: [HACKERS] livetime of a variable defined in a c-procedure (fw d)
Date
Msg-id 219F68D65015D011A8E000006F8590C60267B38A@sdexcsrv1.f000.d0188.sd.spardat.at
Whole thread Raw
List pgsql-hackers
> "Victoria W." <wicki@terror.de> writes:
> > CREATE FUNCTION add_rechnr(int4) RETURNS int4
> >               AS '/usr/local/pgsql/lib/modules/funcs.so' LANGUAGE 'c';
> 
> I don't think there is an "unload shared library" function in Postgres
> (it'd be hard or impossible to implement on some Unixes, anyway).  So
> the only way to stop referencing a shared library once it's been opened
> is to terminate the backend process.
> 
In my experience you can do the psql command:

load '/usr/local/pgsql/lib/modules/funcs.so';

after you changed the lib to load the new library into the backend.
Unfortunately I think you will lose the last value in "rechnr". 

Andreas



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: [HACKERS] 6.6 items
Next
From: ZEUGSWETTER Andreas IZ5
Date:
Subject: Re: [HACKERS] Bizarre coding in _bt_binsrch