Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 426C72E0048 for ; Mon, 19 May 2008 12:08:30 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 43763-04 for ; Mon, 19 May 2008 12:08:17 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp192.iad.emailsrvr.com (smtp192.iad.emailsrvr.com [207.97.245.192]) by developer.postgresql.org (Postfix) with ESMTP id F3D112E0043 for ; Mon, 19 May 2008 12:08:16 -0300 (ADT) Received: from relay9.relay.iad.mlsrvr.com (localhost [127.0.0.1]) by relay9.relay.iad.mlsrvr.com (SMTP Server) with ESMTP id BD6FC1B458D; Mon, 19 May 2008 11:07:52 -0400 (EDT) Received: by relay9.relay.iad.mlsrvr.com (Authenticated sender: chander-AT-otg-nc.com) with ESMTP id 8C91F1B4726; Mon, 19 May 2008 11:07:52 -0400 (EDT) Message-ID: <483197CE.7090706@otg-nc.com> Date: Mon, 19 May 2008 11:07:58 -0400 From: Chander Ganesan User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: "Joshua D. Drake" CC: kevin kempter , pgsql-admin@postgresql.org Subject: Re: Global / cluster-wide functions References: <20080516142530.0ba81186@jd-laptop> In-Reply-To: <20080516142530.0ba81186@jd-laptop> Content-Type: multipart/alternative; boundary="------------090400020900090009030702" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/162 X-Sequence-Number: 29246 This is a multi-part message in MIME format. --------------090400020900090009030702 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Joshua D. Drake wrote: > On Fri, 16 May 2008 15:12:02 -0600 > kevin kempter wrote: > > >> Hi List; >> >> Can I install a PL/pgSQL function so it's global to all databases >> within a cluster or do I need to install per database ? >> >> > > Install it into template1 then each database created after that will > have the function. > As a corollary to that, you'll need to create the function in all existing databases, since changes to the template database only apply to new databases. -- Chander Ganesan Open Technology Group, Inc. One Copley Parkway, Suite 210 Morrisville, NC 27560 919-463-0999/877-258-8987 http://www.otg-nc.com Ask me about OTG's expert PostgreSQL, PostGIS, and other Open Source training offerings. --------------090400020900090009030702 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Joshua D. Drake wrote:
On Fri, 16 May 2008 15:12:02 -0600
kevin kempter <kevin@kevinkempterllc.com> wrote:

  
Hi List;

Can I install a PL/pgSQL function so it's global to all databases  
within a cluster or do I need to install per database ?

    

Install it into template1 then each database created after that will
have the function.
  

As a corollary to that, you'll need to create the function in all existing databases, since changes to the template database only apply to new databases.

-- 
Chander Ganesan
Open Technology Group, Inc.
One Copley Parkway, Suite 210
Morrisville, NC  27560
919-463-0999/877-258-8987
http://www.otg-nc.com
Ask me about OTG's expert PostgreSQL, PostGIS, and other Open Source training offerings.
--------------090400020900090009030702--