pgpool2.git / summary / log / commit / refs

commit    4a772e468be7404fcf39efb26e9b7c0f3903ce1b
Author:   Tatsuo Ishii <ishii@postgresql.org>
Date:     Wed Feb 26 06:49:45 2014 +0000

    Do not enable query cache on materialized views.
    
    Per bug #95.


src/utils/pool_select_walker.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/pool_select_walker.c b/src/utils/pool_select_walker.c index 5c13199cb..2dd2cad57 100644 --- a/src/utils/pool_select_walker.c +++ b/src/utils/pool_select_walker.c @@ -683,11 +683,11 @@ bool is_unlogged_table(char *table_name) bool is_view(char *table_name) { /* - * Query to know if the target table is a view. + * Query to know if the target table is a view (including a materialized view). */ -#define ISVIEWQUERY "SELECT count(*) FROM pg_catalog.pg_class AS c WHERE c.relname = '%s' AND c.relkind = 'v'" +#define ISVIEWQUERY "SELECT count(*) FROM pg_catalog.pg_class AS c WHERE c.relname = '%s' AND (c.relkind = 'v' OR c.relkind = 'm')" -#define ISVIEWQUERY2 "SELECT count(*) FROM pg_catalog.pg_class AS c WHERE c.oid = pgpool_regclass('%s') AND c.relkind = 'v'" +#define ISVIEWQUERY2 "SELECT count(*) FROM pg_catalog.pg_class AS c WHERE c.oid = pgpool_regclass('%s') AND (c.relkind = 'v' OR c.relkind = 'm')" static POOL_RELCACHE *relcache; POOL_CONNECTION_POOL *backend; [parent: 95443947933e]