From: Arsalan Zaidi <azaidi@directi.com>
To: pgsql-interfaces@postgresql.org
Subject: query works in psql, but not thru JDBC
Date: Tue, 5 Jun 2001 16:22:27 +0530
Message-ID: <006a01c0edad$9fd16800$4301a8c0@directi.com> (raw)
Hi.
I'm running this query, which is constructed from parameters passed to a
function.
SELECT * FROM users WHERE userid = 4 ORDER BY name LIMIT 20 OFFSET 0
When I run it from the command line inpsql, It works just fine, but when I
run it using the Postgresql JDBC driver (executeQuery()), I get this error
------------------------
Err Mesg : ERROR: Attribute users.name must be GROUPed or used in an
aggregate function
SQL State : NULL
Error Code : 0
------------------------
Why does it work from the command line and not through JDBC?
Thanks in advance.
--Arsalan.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: azaidi@directi.com
Subject: Re: query works in psql, but not thru JDBC
In-Reply-To: <006a01c0edad$9fd16800$4301a8c0@directi.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox