postgresql 9.5にorafce拡張をインストールしました。私は、すべての拡張機能のための特定のスキーマを作成し、それが何をしたのかが優れていることを知りました。テンプレート1に接続し、次のコマンドを実行しました。postgresqlで拡張orafceでintalledスキーマ
template1=# create schema extensions;
CREATE SCHEMA
template1=# grant usage on schema extensions to public;
GRANT
template1=# grant execute on all functions in schema extensions to public;
GRANT
template1=# alter default privileges in schema extensions grant execute on
functions to public;
ALTER DEFAULT PRIVILEGES
template1=# alter default privileges in schema extensions grant usage on
types to public;
ALTER DEFAULT PRIVILEGES
template1=# create extension orafce schema extensions;
CREATE EXTENSION
template1=# show search_path;
search_path
-----------------
"$user", public
(1 row)
template1=# set search_path="$user",public,extensions;
SET
その後、私は新しいデータベースtest1と新しいユーザーmariel1を作成しました。また、postgresql.confを編集し、search_pathを "$ user"、public、extensionsに設定しました。
データベースに接続しました - psql -d test1 -U mariel1。今私は、データベースが、私は、Oracle、UTL_FILEなどのような他のスキーマの下で一部の機能が利用できることを見たいくつか検索した後に機能
postgres=# select sysdate() from dual;
ERROR: function sysdate() does not exist
LINE 1: select sysdate() from dual;
^
HINT: No function matches the given name and argument types. You might need
to add explicit type casts.
postgres=# select extensions.sysdate() from dual;
ERROR: schema "extensions" does not exist
LINE 1: select extensions.sysdate() from dual;
を認識does notの例えば関数SYSDATEを使用しようとします。 orafce(oracle.sysdateなど)の機能が、異なるスキーマ(oracle、utl_file ..)で作成され、新しいスキーマ拡張の下で作成されなかった理由を理解したいと思います。
ヘルプ?してください... – Mariel