Received: from clubserv.rp-online.de (clubserv.rp-online.de [149.221.232.11]) by hub.org (8.9.2/8.9.1) with ESMTP id BAA39243 for ; Wed, 14 Apr 1999 01:15:10 -0400 (EDT) (envelope-from Michael.Meskes@gmx.net) Received: from pc63.rp-plus.de (as11-asy95.rp-plus.de [149.221.93.223]) by clubserv.rp-online.de (8.9.1a/8.9.1) with ESMTP id HAA04711; Wed, 14 Apr 1999 07:14:53 +0200 (METDST) Received: (from meskes@localhost) by pc63.rp-plus.de (8.9.3/8.9.3/Debian/GNU) id UAA00863; Tue, 13 Apr 1999 20:44:12 +0200 Date: Tue, 13 Apr 1999 20:44:12 +0200 From: Michael Meskes To: Pavel PaJaSoft Janousek Cc: PostgreSQL Interfaces Subject: Re: [INTERFACES] Case sensitive? Message-ID: <19990413204412.B835@gmx.net> Mail-Followup-To: Pavel PaJaSoft Janousek , PostgreSQL Interfaces References: <012c01be850e$50145a20$0200a8c0@server.fonet2.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <012c01be850e$50145a20$0200a8c0@server.fonet2.cz>; from Pavel PaJaSoft Janousek on Mon, Apr 12, 1999 at 12:55:56PM +0200 On Mon, Apr 12, 1999 at 12:55:56PM +0200, Pavel PaJaSoft Janousek wrote: > Fine, SQL and ECPG is case insensitive, but why I couldn't access any > column which has name with upper character(s)? Problem isn't in C program, > which is produced by ECPG, but somebody between comunication, isn't it? Can you access that column from psql with the very same statement? > I never may use this: > > exec sql select sum (Col1) from tmp; - this is internaly (by ECPG) converted > to: exec sql select sum (col1) from tmp; > > because when table contains columnt 'Col1', I've got message that 'col1' > doesn't exist (by sqlca). This is the expected behaviour yes, but you should get the same when using psql. Try this: postgres@tanja:~$ psql mm Welcome to the POSTGRESQL interactive sql monitor: Please read the file COPYRIGHT for copyright terms of POSTGRESQL type \? for help on slash commands type \q to quit type \g or terminate with semicolon to execute query You are currently connected to the database: mm mm=> create table test (Col1 int); CREATE mm=> select * from test; col1 ---- (0 rows) mm=> select Col1 from test; col1 ---- (0 rows) As you see the create statement is tranformed to lowercase so there is no column Col1. And you can access col1 (even as Col1) from ecpg. Michael -- Michael Meskes | Go SF 49ers! Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire! Tel.: (+49) 2431/72651 | Use Debian GNU/Linux! Email: Michael.Meskes@gmx.net | Use PostgreSQL!