Re: Group by clause problem with postgresql jdbc 9.0-801

Поиск
Список
Период
Сортировка
От Maciek Sakrejda
Тема Re: Group by clause problem with postgresql jdbc 9.0-801
Дата
Msg-id CAH_hXRZj2vUNZLnYbCtSdJn_V4sAZvU=fW912CjWOMji7AbdRg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Group by clause problem with postgresql jdbc 9.0-801  (Dave Cramer <pg@fastcrypt.com>)
Ответы Re: Group by clause problem with postgresql jdbc 9.0-801  (Simon Riggs <simon@2ndQuadrant.com>)
Список 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Johann 'Myrkraverk' Oskarsson"
Дата:
Сообщение: Re: Patch: Some more state codes
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Group by clause problem with postgresql jdbc 9.0-801