2015-10-28 89 views
0

的Postgres的功能,我有嘗試使用功能不能使用在一定範圍內

public.gen_random_uuid() 

但Postgres的回報的腳本:HINT: No function matches the given name and argument types. You might need to add explicit type casts.

但是當我嘗試只是SELECT gen_random_uuid();它工作正常。所以清楚 公衆。正在打破它。

我試圖從我的search_path中刪除public但這也沒有幫助。

任何想法?

+0

「*所以很明顯大衆*」 - 不是全部。 'show search_path'給你什麼? –

回答

1

推測它是在不同的模式。檢查。在psql

\df gen_random_uuid 

會告訴你架構。

否則:

select p.proname, n.nspname 
from pg_proc p inner join pg_namespace n on (p.pronamespace = n.oid) 
where p.proname = 'gen_random_uuid';