From: Michael Meskes <meskes@postgresql.org>
To: Pavel PaJaSoft Janousek <janousek@fonet.cz>
Cc: PostgreSQL Interfaces <pgsql-interfaces@postgresql.org>
Subject: Re: [INTERFACES] Case sensitive?
Date: Tue, 13 Apr 1999 20:44:12 +0200
Message-ID: <19990413204412.B835@gmx.net> (raw)
In-Reply-To: <012c01be850e$50145a20$0200a8c0@server.fonet2.cz>
References: <012c01be850e$50145a20$0200a8c0@server.fonet2.cz>
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!
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: meskes@postgresql.org, janousek@fonet.cz
Subject: Re: [INTERFACES] Case sensitive?
In-Reply-To: <19990413204412.B835@gmx.net>
* 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