pgpool2.git / summary / log / commit / refs

commit    da11bcdfa9c6464e2b20a844502a981a5a7c8cb2
Author:   Tatsuo Ishii <ishii@postgresql.org>
Date:     Wed Jun 06 02:26:18 2012 +0000

    Add new directive "check_temp_table".


pool_memqcache.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pool_memqcache.c b/pool_memqcache.c index e5bb5b75f..fd0a3a97a 100644 --- a/pool_memqcache.c +++ b/pool_memqcache.c @@ -696,11 +696,16 @@ bool pool_is_allow_to_cache(Node *node, char *query) return false; /* - * If SELECT uses non immutable functions or temporary tables - * it's not allowed to cache. + * If SELECT uses non immutable functions, it's not allowed to + * cache. */ - if (pool_has_non_immutable_function_call(node) || - pool_has_temp_table(node)) + if (pool_has_non_immutable_function_call(node)) + return false; + + /* + * If SELECT uses temporary tables it's not allowed to cache. + */ + if (pool_config->check_temp_table && pool_has_temp_table(node)) return false; /* [parent: ab66d2093239]