Re: Creating 'global' functions. - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Creating 'global' functions.
Date
Msg-id 20040131071726.GB3073@svana.org
Whole thread Raw
In response to Creating 'global' functions.  (Matthew Jones <jonespm@engin.umd.umich.edu>)
List pgsql-general
On Mon, Jan 26, 2004 at 04:40:33PM -0500, Matthew Jones wrote:
> Is there a way, when a function is created (in language SQL for example),
> for it to be available globally, as the pg_catalog functions are. All of
> the ones I create are only available on the database they were created,
> and I can't figure out a way to make it so they're available to all
> without having to run the functions in every database. When you run a
> select on pg_proc they won't even appear, but all of the 'catalog' ones
> will.

If you create a function in template1 it will be automatically transferred
to new database created, but not to existing ones.

So just after installation, add them to template1, then create the other
databases.
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> (... have gone from d-i being barely usable even by its developers
> anywhere, to being about 20% done. Sweet. And the last 80% usually takes
> 20% of the time, too, right?) -- Anthony Towns, debian-devel-announce

Attachment

pgsql-general by date:

Previous
From: "Carla Mello"
Date:
Subject: Executing dynamic queries (EXECUTE)
Next
From: Michael Glaesemann
Date:
Subject: Re: Two joins on same foreign key