Skip site navigation (1) Skip section navigation (2)

Re: How to make the user-defined function or type being accessed in the global database server?

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: 页公倒龙 <77287991(at)qq(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How to make the user-defined function or type being accessed in the global database server?
Date: 2011-02-20 09:18:33
Message-ID: 4D60DC69.5000102@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On 20.02.2011 08:03, 页公倒龙 wrote:
> Hello, I had defined user-defined function and type in database A by using user Root.when i want to access the function and type in another database B by using the same user Root, but found that i could't access them. How to make the user-defined function or type being accessed in the global database server?

You can't. The user-defined function and type need to be created 
separately in each database.

You can, however, create them in the 'template1' database *before* 
creating the other databases. That way they are automatically copied to 
database you create. See 
http://www.postgresql.org/docs/9.0/interactive/manage-ag-templatedbs.html.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

In response to

pgsql-hackers by date

Next:From: Radosław SmoguraDate: 2011-02-20 10:20:22
Subject: Void binary patch
Previous:From: Jaime CasanovaDate: 2011-02-20 07:12:20
Subject: Re: Sync Rep v17

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group