LoginSignup
2
1

More than 5 years have passed since last update.

PostgreSQL Function の中で Function を呼び出す (Call function in other function)

Last updated at Posted at 2018-11-30

PostgreSQL のストアドファンクション内 で ファンクションを呼び出す方法です。

返り値が void のファンクションを呼び出す。

PERFORM を使います。

PERFORM function_name();

この PERFORM は、 psql で直接使うことはできません。
psql での関数呼び出しには SELECT を使います。

TABLE を返すようなファンクションは ファンクション内でも SELECT を使って呼び出せます。


The way to call stored function in function, in PostgreSQL.

Call function with void return value

Use PERFORM.

PERFORM function_name();

PERFORM cannot be used in psql console.
It's available only in function.
To call function in psql console, use SELECT.

To call the function that returns TABLE type in other function, you can use SELECT.

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1