postgresの関数の引数が次のように定義されているかどうかを確認することは可能ですか?
table.column%type foo
また
sometype foo
クエリ例:pg_proc?
postgresの関数の引数が次のように定義されているかどうかを確認することは可能ですか?
table.column%type foo
また
sometype foo
クエリ例:pg_proc?
のproargtypes
列pg_proc
は、すべての関数の引数の型の配列です。その後、各タイプを相互参照できpg_type.oid
ます。
したがって、次のような関数を定義すると:
steve@steve@[local] =# create function testfunc(pg_proc.proname%type) returns boolean language 'sql' immutable strict as $$ select true $$;
NOTICE: type reference pg_proc.proname%TYPE converted to name
CREATE FUNCTION
まあ、その通知はあまり希望的ではありません。
その関数の pg_proc エントリは次のとおりです。
proname | proargtypes
----------+-------------
testfunc | 19
タイプ19は単なる「名前」です。ここでの答えは「いいえ」のようです。