Skip site navigation (1) Skip section navigation (2)

Re: query works in psql, but not thru JDBC

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Arsalan Zaidi" <azaidi(at)directi(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: query works in psql, but not thru JDBC
Date: 2001-06-05 14:16:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
"Arsalan Zaidi" <azaidi(at)directi(dot)com> writes:
> 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 must be GROUPed or used in an
> aggregate function

Curious.  Does JDBC alter the query at all before it sends it?  Try
turning on query logging at the postmaster, and look in the postmaster
log to see what is actually being sent.

			regards, tom lane

In response to

pgsql-interfaces by date

Next:From: Magnus HaganderDate: 2001-06-05 14:47:02
Subject: RE: [DOCS] Re: libpq sockets on win32
Previous:From: Tom LaneDate: 2001-06-05 13:56:15
Subject: Re: What is the difference between the two MSI insta llers?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group