27. 問題その1
ImportError: No module named bottole
カレントに配置したbottole.pyが読み込めない
普通はカレントディレクトリは指定しなくてもいい
PostgreSQLの子プロセスは$PGDATAがカレント
pg2layer_db=# CREATE OR REPLACE FUNCTION test() RETURNS text AS
pg2layer_db# $$
pg2layer_db$#
pg2layer_db$# import bottole
pg2layer_db$# $$
pg2layer_db# LANGUAGE 'plpythonu' VOLATILE;
CREATE FUNCTION
pg2layer_db=#
pg2layer_db=# select test();
ERROR: ImportError: No module named bottole
CONTEXT: Traceback (most recent call last):
PL/Python function "test", line 3, in <module>
import bottole
PL/Python function "test"