Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 06C641337BA1; Mon, 14 Feb 2011 12:33:04 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 86754-06; Mon, 14 Feb 2011 16:32:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 9487B1337B7E; Mon, 14 Feb 2011 12:32:55 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p1EGWqRb025497; Mon, 14 Feb 2011 11:32:52 -0500 (EST) To: Dimitri Fontaine cc: pgsql-hackers@postgresql.org, pgsql-docs@postgresql.org Subject: Re: [HACKERS] "Extension" versus "module" In-reply-to: References: <25160.1297664305@sss.pgh.pa.us> <87r5ba4z1x.fsf@2ndQuadrant.fr> <20217.1297697118@sss.pgh.pa.us> Comments: In-reply-to Dimitri Fontaine message dated "Mon, 14 Feb 2011 17:17:48 +0100" Date: Mon, 14 Feb 2011 11:32:52 -0500 Message-ID: <25496.1297701172@sss.pgh.pa.us> From: Tom Lane 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/51 X-Sequence-Number: 6399 Dimitri Fontaine writes: > Another concern has to do with PLs. We said that with the dependency > mechanism it would be good to have PLs be EXTENSIONs. But those are > core provided extensions, one of them installed by default. > If we make PLs extensions, we might also want to have CREATE LANGUAGE > either ERROR out or silently do the CREATE EXTENSION instead, meaning > that CREATE LANGUAGE behavior would depend on creating_extension. > Sounds like a crock but ensures compatibility. Yeah. I was sort of wondering whether we could get rid of pg_pltemplate altogether, and instead rely on the extension mechanism to package up the correct parameters for installing a language. However, one thing that'd have to be solved before going very far in this direction is the question of allowing CREATE EXTENSION to non-superusers. We'd at least need to be able to duplicate the current functionality of allowing CREATE LANGUAGE to database owners (with an override available to the DBA). This seems like a matter for a separate thread though, and not on pgsql-docs. regards, tom lane