X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 787D152B1C for ; Tue, 12 Jul 2005 18:13:17 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 94239-01 for ; Tue, 12 Jul 2005 21:13:06 +0000 (GMT) Received: from svr2.postgresql.org (svr2.postgresql.org [65.19.161.25]) by svr1.postgresql.org (Postfix) with ESMTP id 337C052FDF for ; Tue, 12 Jul 2005 18:06:36 -0300 (ADT) Received: from fed1rmmtao08.cox.net (fed1rmmtao08.cox.net [68.230.241.31]) by svr2.postgresql.org (Postfix) with ESMTP id AF4CFF0B85 for ; Tue, 12 Jul 2005 04:13:08 +0100 (BST) Received: from [192.168.1.200] (really [68.111.226.8]) by fed1rmmtao08.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050712031618.BQSO16890.fed1rmmtao08.cox.net@[192.168.1.200]> for ; Mon, 11 Jul 2005 23:16:18 -0400 Message-ID: <42D33601.5080605@acm.org> Date: Mon, 11 Jul 2005 20:16:17 -0700 From: TJ O'Donnell Reply-To: tjo@acm.org User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: dynamically loaded functions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.035 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/104 X-Sequence-Number: 22082 I've written some c-functions which depend on my code (gnova.so) as well as a third-party library of functions (oe_chem.so). Up until now, I've been preloading (in postgresql.conf) both .so's and it all works fine. To make it easier for my users to install my stuff, I'd like to avoid the preloading, but this would require giving 2 .so names in the CREATE FUNCTION statement (I imagine). So, what I would like to do is something like this: CREATE or REPLACE FUNCTION cansmiles(varchar) RETURNS varchar AS 'gnova,oe_chem', 'oe_cansmiles' LANGUAGE 'c' IMMUTABLE STRICT; but I get this: ERROR: could not access file "gnova,oe_chem": No such file or directory What I'm doing now: CREATE or REPLACE FUNCTION cansmiles(varchar) RETURNS varchar AS 'gnova', 'oe_cansmiles' LANGUAGE 'c' IMMUTABLE STRICT; requires preloading of oe_chem.so to work. Is there any way I can associate oe_cansmiles with 2 .so's without preloading? More info: oe_cansmiles is in gnova.so, but there are functions in gnova.so that are in oe_chem.so. TJ