Re: [bug?] oddity creating table with uppercase initial

From: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
To: Paul Makepeace <postgresql(dot)org(at)paulm(dot)com>, PostgreSQL Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: [bug?] oddity creating table with uppercase initial
Date: 2003-06-08 13:42:31
Message-ID: 3EE33D47.7040801@mega-bucks.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Paul Makepeace wrote:
>
> => create sequence Banks_id_seq;
> CREATE
> => CREATE TABLE "Banks" ("id" integer DEFAULT nextval('"Banks_id_seq"'::text) NOT NULL);
> CREATE
> => select * from banks;
> ERROR: Relation "banks" does not exist

I'm new to this but I think you need to quote "Banks". Try

select * from 'Banks';

> Should I simply avoid names with uppercase? This seems like a shame.

Like the plague I should think.

It is possible to make SQL (or maybe just postgresQL) case sensitive but
I think the consensus is that it is more pain than it is worth. Someone
more versed in the in-and-outs of uppercase-lowercase issues with table
names will doubtlessly tell you all the nasty details.

HTH,

--

Jean-Christian Imbeault

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Bruno Wolff III 2003-06-08 14:15:50 Re: [bug?] oddity creating table with uppercase initial
Previous Message Bruno Wolff III 2003-06-08 11:22:36 Re: Question regarding keyword checkboxes in database design