需要使用SQL提取PostgreSQL函數的源代碼。postgresql提取函數源
我看到這個奇怪的行爲與其中一個功能,所有其他功能(大約200+)工作絕對好。
當我運行下面的語句,它的工作原理:
select prosrc from pg_proc where proname= 'accounts_count';
然而,當我運行下面的,它返回一個空字符串:
select routine_definition
from information_schema.routines
where specific_name = 'accounts_count_66243'
PostgreSQL的8.3版本。我曾嘗試使用pgAdmin III和psql。
不是一個表演塞子,但會知道爲什麼這可能是有用的。
任何想法的人?
什麼'select length(routine_definition)...'return? –
從8.4開始,有'pg_get_functiondef()'。也許是更新到更新版本的另一個原因? –