SPI_keepplan <refpurpose>save a prepared statement</refpurpose> — 準備済み文を保持する
int SPI_keepplan(SPIPlanPtr plan)
   <function>SPI_keepplan</function> saves a passed statement (prepared by
   <function>SPI_prepare</function>) so that it will not be freed
   by <function>SPI_finish</function> nor by the transaction manager.
   This gives you the ability to reuse prepared statements in the subsequent
   invocations of your C function in the current session.
SPI_keepplanは渡された(SPI_prepareで準備された)文をSPI_finishとトランザクションマネージャで解放されないメモリ内に保存します。
これは、現在のセッションにおける、その後のC関数の呼び出しで準備済み文を再利用できる機能を提供します。
  
SPIPlanPtr planthe prepared statement to be saved 保存する準備済み文
   0 on success;
   <symbol>SPI_ERROR_ARGUMENT</symbol> if <parameter>plan</parameter>
   is <symbol>NULL</symbol> or invalid
成功時は0。
planがNULLまたは無効な場合はSPI_ERROR_ARGUMENT
  
   The passed-in statement is relocated to permanent storage by means
   of pointer adjustment (no data copying is required).  If you later
   wish to delete it, use <function>SPI_freeplan</function> on it.
渡された文はポインタの調整により永続的記憶領域に再配置されます(データコピーは不要です)。
後ほど削除したければ、SPI_freeplanを実行してください。