<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi,<div><br></div><div>I am new to mondrian. I am trying to make mondrian-4.1.1.0 branch work with postgres. When I build, I get a test failure in testLevelTableAttributeAsView. The error comes from the cube definition in the unit test generating the following sql statement:</div><div><br></div><div><div><i> select "gender2"."gender" as "c0", sum("sales_fact_1997"."unit_sales") as "m0"</i></div><div><i> from "sales_fact_1997" as "sales_fact_1997", (</i></div><div><i> SELECT * FROM "customer"</i></div><div><i> ) as "gender2" where "sales_fact_1997"."customer_id" = <b>"gender2"."gender"</b> group by "c0"</i></div></div><div><br></div><div>While MySQL will ignore the type mismatch, Postgres does not like t<span style="font-size: 12pt;">he "where" clause; it should really be "gender2"."customer_id" instead of "gender2"."gender". In order to try to correct this, I changed the attribute in the cube </span><span style="font-size: 12pt;">from</span></div><div><br></div><div> <i> <Attribute name='Gender' keyColumn='gender'></i></div><div><br></div><div>to </div><div><br></div><div> <i><Attribute name='Gender' nameColumn='gender' keyColumn='customer_id'></i></div><div><br></div><div>But this is not generating the expected result because it generates the following sql:</div><div><span style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;"><i> select "gender2".<b>"customer_id"</b> as "c0", sum("sales_fact_1997"."unit_sales") as "m0"</i></span></div><div><div><i> from "sales_fact_1997" as "sales_fact_1997", (</i></div><div><i> SELECT * FROM "customer"</i></div><div><i> ) as "gender2" where "sales_fact_1997"."customer_id" = "gender2"."customer_id" group by "c0"</i></div></div><div><br></div><div>Is this a cube definition problem or problem in the sql generation in mondrian?</div><div><br></div><div>Any help would be appreciated.</div><div><br></div><div>Thanks,</div><div><br></div><div>Suki</div><div><br></div><div><br></div>                                            </div></body>
</html>