acemeicn <acemeijp@xxxxxxxxxxx> writes: > I tried excuting the long sql on the console and a DB tool > called CSE(Common SQL Environment), it worked. > but in a java program using JDBC connection it doesn't > work. Possibly the folks on pgsql-jdbc could help you with that. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match