Could this be the difference between
cqdb=# prepare foo(int, int) as select x / $1 from generate_series(1,10) x group by x / $2; execute foo(3,3);
ERROR: column "x.x" must appear in the GROUP BY clause or be used in an aggregate function
ERROR: prepared statement "foo" does not exist
and
cqdb=# select x / 3 from generate_series(1,10) x group by x / 3;
?column?
----------
2
0
3
1
(4 rows)
?
This could be the case if Navicat is inlining the parameters. Unfortunately, I can't think of a good suggestion for a fix if this is indeed the case (except that the generated queries should group by the columns of interest, rather than repeating the expressions, but that's probably not an easy fix)...
---
Maciek Sakrejda | System Architect | Truviso
1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com