From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Matthew Jones <jonespm(at)engin(dot)umd(dot)umich(dot)edu> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Creating 'global' functions. |
Date: | 2004-01-31 07:17:26 |
Message-ID: | 20040131071726.GB3073@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)svana(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Rajat Katyal | 2004-01-31 09:37:07 | Fw: [JDBC] Trigger function aborts the transaction on exception |
Previous Message | Anony Mous | 2004-01-31 06:35:03 | Re: Two joins on same foreign key |