[pgpool-general-jp: 420] Re: pgpool-II: from 句での alias
sho
sho @ big.or.jp
2008年 3月 17日 (月) 15:49:47 JST
こんにちは、sho と申します。
# だれからもコメントなかったけど、なんか根本的に勘違いしてるのかな〜?
source を追ってみた感じでは、pool_rewrite_outfuncs.c の _rewriteRangeVar 関数内の
delay_string_append_char(message, str, node->relname);
で alias 処理されてないため失敗しているように見えるので、
とりあえず、以下の patch を当ててみました。
---------------
*** pool_rewrite_outfuncs.c.org Thu Nov 15 09:39:56 2007
--- pool_rewrite_outfuncs.c Mon Mar 17 14:43:51 2008
***************
*** 1757,1762 ****
--- 1757,1768 ----
message->schemaname = NULL;
delay_string_append_char(message, str, node->relname);
+ /* add */
+ if(alias_name)
+ {
+ delay_string_append_char(message, str, " AS ");
+ delay_string_append_char(message, str, alias_name);
+ }
if(select->whereClause &&
!(message->r_code == SELECT_PGCATALOG))
---------------
これで動いているみたいですが、大丈夫ですかね?
-- sho
pgpool-general-jp メーリングリストの案内