From: Ashutosh B. <ash...@en...> - 2013-11-21 04:40:47
|
Hi Masataka, To start debugging, you might want to fire this query with debugger breaking on errstart() or errfinish() or some error reporting hook where you can break. The stack stress should give you a lead as to where the error is coming from. It's high chance that it's coming from pgxc_locate_grouping_columns(). But anyway, start looking around the callers of get_sortgroupref_tle() and check their arguments. Best luck. On Thu, Nov 21, 2013 at 6:51 AM, Masataka Saito <pg...@gm...> wrote: > Thanks for your information. > It seems very helpful. > > cx=# explain verbose SELECT DISTINCT t2.b FROM t1 JOIN t2 ON t1.id = > t2.id GROUP BY b; > ERROR: XX000: ORDER/GROUP BY expression not found in targetlist > LOCATION: get_sortgroupref_tle, tlist.c:251 > > On Thu, Nov 21, 2013 at 9:53 AM, 鈴木 幸市 <ko...@in...> wrote: > > Yes, you can do it with SET command as well just for a target statement. > > > > Regards; > > --- > > Koichi Suzuki > > > > 2013/11/21 7:46、Michael Paquier <mic...@gm...> のメール: > > > >> On Thu, Nov 21, 2013 at 12:32 AM, Masataka Saito <pg...@gm...> > wrote: > >>> XC can't build a plan. > >>> > >>> db=# explain verbose SELECT DISTINCT t2.b FROM t1 JOIN t2 ON t1.id = > >>> t2.id GROUP BY b; > >>> ERROR: ORDER/GROUP BY expression not found in targetlist > >> This is a higher-level bug, planner bug just by looking at this code > >> path src/backend/optimizer/util/tlist.c... > >> > >> Note: Setting up VERBOSITY to verbose in .psqlrc helps grabbing more > >> details about the errors that occurred in server like the file name + > >> name of this elog/ereport ERROR: > >> \set VERBOSITY verbose > >> For dev purposes it is a pretty useful default ;) > >> > >> Regards, > >> -- > >> Michael > >> > >> > ------------------------------------------------------------------------------ > >> Shape the Mobile Experience: Free Subscription > >> Software experts and developers: Be at the forefront of tech innovation. > >> Intel(R) Software Adrenaline delivers strategic insight and > game-changing > >> conversations that shape the rapidly evolving mobile landscape. Sign up > now. > >> > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk > >> _______________________________________________ > >> Postgres-xc-developers mailing list > >> Pos...@li... > >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > >> > > > > > ------------------------------------------------------------------------------ > Shape the Mobile Experience: Free Subscription > Software experts and developers: Be at the forefront of tech innovation. > Intel(R) Software Adrenaline delivers strategic insight and game-changing > conversations that shape the rapidly evolving mobile landscape. Sign up > now. > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company |