Doc: enhance query cache doc.
authorTatsuo Ishii <ishii@postgresql.org>
Fri, 9 May 2025 01:55:38 +0000 (10:55 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Fri, 9 May 2025 01:55:38 +0000 (10:55 +0900)
Pgpool refuses to cache a query calling functions returning TIMESTAMP
WITH TIMEZONE, TIME WITH TIMEZONE. If there are multiple functions
having same name and one of them returns TIMESTAMP WITH TIMEZONE, TIME
WITH TIMEZONE, pgpool refuses to cache even if one of them does not
return the data types. So add a note on this along with workaround.

doc.ja/src/sgml/memcache.sgml
doc/src/sgml/memcache.sgml

index d7c9a493e98fa0c90e3c6db49ea640e6943bcc71..26e3b79bf2fde2a2b27ce3be5772116958bc5a30 100644 (file)
   </para>
  </note>
 
+ <note>
+  <para>
+   関数が同じ名前で複数登録されていて、その中にTIMESTAMP WITH TIMEZONE、TIME WITH TIMEZONEを返す関数が含まれている場合、実際にSQL文の中で使われている関数がTIMESTAMP WITH TIMEZONEを返さないものであっても、<productname>Pgpool-II</productname>は、キャッシュできないと判断します。
+   その場合は、その関数のラッパー関数を作成し、TIMESTAMP WITHOUT TIMEZONEあるいはTIME WITHOUT TIMEZONEを返すようにするか、/*FORCE QUERY CACHE*/コメントを使用することによってクエリキャッシュが使えます。
+  </para>
+ </note>
+
  <para>
   <!--
   In memory cache saves the pair of SELECT statement
index 6cd92053152876d197ec3d8c8ad0fec12f97c897..b1a48ed7ddbc392113e340e75679760e8fcce72d 100644 (file)
   </para>
  </note>
 
+ <note>
+  <para>
+   If multiple functions having the same name are registered and one
+   of them returns TIMESTAMP WITH TIMEZONE or TIME WITH
+   TIMEZONE, <productname>Pgpool-II</productname> thinks that the
+   query cannot be cached even if it uses a version of function which
+   does not return TIMESTAMP WITH TIMEZONE or TIME WITH TIMEZONE. In
+   this case you can create a wrapper function returning TIMESTAMP
+   WITHOUT TIMEZONE or TIME WITHOUT TIMEZONE, or use /*FORCE QUERY
+   CACHE*/ comment so that you can use the query cache.
+  </para>
+ </note>
+
  <para>
   On the other hand, it might be slower than the normal path
   in some cases, because it adds some overhead to store cache.