Received: from ece.rice.edu (ece.rice.edu [128.42.4.34]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fAQLskm34713 for ; Mon, 26 Nov 2001 16:54:47 -0500 (EST) (envelope-from reedstrm@rice.edu) Received: from localhost (localhost [127.0.0.1]) by ece.rice.edu (Postfix) with ESMTP id 2EBA068A17; Mon, 26 Nov 2001 15:54:48 -0600 (CST) Received: from wallace.ece.rice.edu (wallace.ece.rice.edu [128.42.12.154]) by ece.rice.edu (Postfix) with ESMTP id 77C6868A0E; Mon, 26 Nov 2001 15:54:47 -0600 (CST) Received: from reedstrm by wallace.ece.rice.edu with local (Exim 3.22 #1 (Debian)) id 168TiB-0001Xy-00; Mon, 26 Nov 2001 15:54:47 -0600 Date: Mon, 26 Nov 2001 15:54:47 -0600 From: "Ross J. Reedstrom" To: Colin Freas Cc: pgsql-jdbc@postgresql.org Subject: Re: JDBC bug? Message-ID: <20011126155447.B5801@rice.edu> Mail-Followup-To: "Ross J. Reedstrom" , Colin Freas , pgsql-jdbc@postgresql.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.18i X-Virus-Scanned: by AMaViS snapshot-20010714 X-Archive-Number: 200111/288 X-Sequence-Number: 2485 On Mon, Nov 26, 2001 at 04:24:46PM -0500, Colin Freas wrote: > > Barry, > > I'm just saying that it's frustrating because in one of my earlier checks to > make sure my SQL was ok, I used Access 2000 with some linked tables to my Ah, here's the real problem: MS-Access 'helpfully' quotes all the identifiers for you, behind your back. Kind of like the 'helpful' things Word does as you type. I got bit by the same behavior: I created same tables from inside Access, and got to spend some time finding all the MiXedCase BuGs in PostgreSQL v 6.2 (or so). > Postgres db. When I ran 'select * from response where questionID=16' > through that, it worked without a hitch (actually, the 16 needed to be > '16'), so I figured the problem was somewhere else. Plus it was such simple > SQL, I mean, what could be wrong with it? I'd be the first to admit I > don't... well, I didn't... know the nuances of the SQL9X casing rules. My > issue, as stated in my initial note, was more that nobody (jdbc, postgres, > tomcat) told me that my where clause was, essentially, bogus. I mean, what > am I catching that SQLException for? > > And Bruce wrote... > >rs = stmt.executeQuery("select * from response where \"questionID\"=16"); > > That works. Indeed. BTW, as long as you stay away from software that meses with your queries, you can get away with writing: select * from response where questionID=16; As long as the table was created the same way (i.e., no quotes): create table response (questionID int , ...) The only problem is that the column name returned by the system will be questionid. Ross