From: Masataka S. <pg...@gm...> - 2013-11-14 08:14:35
|
Hello, all. I'm testing complex SQLs on Postgres-XC 1.1. And I found bad SQL that XC doesn't accept. The SQL is from answer 2 of chapter 17 in SQL puzzle book by Joe Celko. I simplified it for everyone's reproduction. db=# CREATE TABLE t1(id INT, a INT); CREATE TABLE db=# CREATE TABLE t2(id INT, b INT); CREATE TABLE db=# 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 SQL is accepted by PostgreSQL 9.2.4. Can anyone solve or explain this issue? Regards. |