From: | Maciek Sakrejda <msakrejda(at)truviso(dot)com> |
---|---|
To: | Dave Cramer <pg(at)fastcrypt(dot)com> |
Cc: | Seckin Pulatkan <seckinpulatkan(at)hotmail(dot)com>, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Group by clause problem with postgresql jdbc 9.0-801 |
Date: | 2011-09-07 21:55:10 |
Message-ID: | CAH_hXRZj2vUNZLnYbCtSdJn_V4sAZvU=fW912CjWOMji7AbdRg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2011-09-08 06:00:53 | Re: Group by clause problem with postgresql jdbc 9.0-801 |
Previous Message | Johann 'Myrkraverk' Oskarsson | 2011-09-07 21:31:34 | Re: Patch: Some more state codes |