pgpool2.git / summary / log / commit / refs
commit 26c9b07dc81340d648fbd977c5ce2dd20e5265d2
Author: Tatsuo Ishii <ishii at sraoss.co.jp>
Date: Tue Aug 10 00:36:14 2010 +0000
Make timestamp rewriting schema aware.
pool_timestamp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pool_timestamp.c b/pool_timestamp.c
index e5b811a98..24c2a6eed 100644
--- a/pool_timestamp.c
+++ b/pool_timestamp.c
@@ -112,7 +112,7 @@ relcache_lookup(TSRewriteContext *ctx)
#define ATTRDEFQUERY "SELECT attname, coalesce(d.adsrc = 'now()' OR d.adsrc LIKE '%%''now''::text%%', false)" \
" FROM pg_catalog.pg_class c, pg_catalog.pg_attribute a " \
" LEFT JOIN pg_catalog.pg_attrdef d ON (a.attrelid = d.adrelid AND a.attnum = d.adnum)" \
- " WHERE c.oid = a.attrelid AND a.attnum >= 1 AND a.attisdropped = 'f' AND c.relname = '%s'" \
+ " WHERE c.oid = a.attrelid AND a.attnum >= 1 AND a.attisdropped = 'f' AND c.oid = '%s'::regclass::oid" \
" ORDER BY a.attnum"
if (!ts_relcache)
[parent: 64505d34e4c6]