From: Tom Lane <tgl@sss.pgh.pa.us>
To: Seamus Thomas Carroll <carrolls@cpsc.ucalgary.ca>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Help with adding C-Language Functions
Date: Thu, 10 Feb 2005 12:31:13 -0500
Message-ID: <27779.1108056673@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.60.0502100114310.5503@frost>
References: <Pine.LNX.4.60.0502091954340.5503@frost>
<Pine.LNX.4.60.0502100114310.5503@frost>
Seamus Thomas Carroll <carrolls@cpsc.ucalgary.ca> writes:
> I changed my file from BlackboardFunctions.c to all lowercase,
> blackboardfunctions.c, and the database now finds the add_one function.
I'm betting that the actual sequence of events was more like this:
CREATE FUNCTION f1(...) as '/home/.../BlackboardFunctions' ...;
[ test f1, it works, cool ]
[ add add_one to C source file, recompile ]
CREATE FUNCTION add_one(...) as '/home/.../BlackboardFunctions' ...;
[ fails ]
[ rename file ]
CREATE FUNCTION add_one(...) as '/home/.../blackboardfunctions' ...;
[ works ]
The reason the second try didn't work is that an existing backend will
not re-load an already loaded .so file, unless you force it to with the
LOAD command. It doesn't notice that you've modified the file. Had you
started a fresh session, things would have worked, too.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, carrolls@cpsc.ucalgary.ca
Subject: Re: Help with adding C-Language Functions
In-Reply-To: <27779.1108056673@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox