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

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?

I look forward to hearing from you again soon. 

Yours sincerely 
On 02/19/11 5:57 PM, 页公倒龙 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?
>
> I look forward to hearing from you again soon.
>

functions are only defined in the context of the database you define
them in. you'll need to add your function to any database you want to
use it in.




On 02/20/2011 09:57 AM, 页公倒龙 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 probably want to use one database with multiple schema instead. See
the manual for more information about schema.

--
Craig Ringer