Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 8E1201337B58 for ; Tue, 1 Feb 2011 07:31:17 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 14617-09 for ; Tue, 1 Feb 2011 11:31:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail0.aip.de (maigret.aip.de [141.33.160.2]) by mail.postgresql.org (Postfix) with SMTP id D66BC1337B34 for ; Tue, 1 Feb 2011 07:31:09 -0400 (AST) Received: (qmail 6069 invoked from network); 1 Feb 2011 10:25:36 -0000 Received: from cashmere.aip.de (141.33.4.98) by mailout.aip.de with SMTP; 1 Feb 2011 10:25:36 -0000 Received: from cashmere.aip.de (localhost.localdomain [127.0.0.1]) by cashmere.aip.de (8.13.8/8.13.8) with ESMTP id p11BV9dc001549 for ; Tue, 1 Feb 2011 12:31:09 +0100 Received: (from swhite@localhost) by cashmere.aip.de (8.13.8/8.13.8/Submit) id p11BV9OG001548 for pgsql-bugs@postgresql.org; Tue, 1 Feb 2011 12:31:09 +0100 X-Authentication-Warning: cashmere.aip.de: swhite set sender to swhite@aip.de using -f Date: Tue, 1 Feb 2011 12:31:09 +0100 From: Steve White To: pgsql-bugs@postgresql.org Subject: Portable, simple means of determining distribution directory Message-ID: <20110201113109.GB1327@cashmere.aip.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i "Organization: Astrophysikalisches Institut Potsdam" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/3 X-Sequence-Number: 29275 Hi, This was discussed on pgsql-general 28 Jan 2011. It would be advantageous to have a portable, simple means of including a module from the distribution contrib/ directory. One idea would be some kind of variable expansion with the \i command: \i $libdir/contrib/module.sql Another would be a special command for loading modules, maybe loadmod( modname ) There should of course be some reasonable means of informing a user that these have failed to find the desired module. Note that several options were discussed. One could work, but is quite messy, requiring special installations and code. Also, this proposal is not an alternative to a full module system as discussed in http://wiki.postgresql.org/wiki/Module_Manager (although it might facilitate development of such a thing.) Cheers! -- | - - - - - - - - - - - - - - - - - - - - - - - - - | Steve White +49(331)7499-202 | E-Science Zi. 27 Villa Turbulenz | - - - - - - - - - - - - - - - - - - - - - - - - - | Astrophysikalisches Institut Potsdam (AIP) | An der Sternwarte 16, D-14482 Potsdam | | Vorstand: Prof. Dr. Matthias Steinmetz, Peter A. Stolz | | Stiftung privaten Rechts, Stiftungsverzeichnis Brandenburg: III/7-71-026 | - - - - - - - - - - - - - - - - - - - - - - - - -