Re: [bug?] oddity creating table with uppercase initial - Mailing list pgsql-novice

From Jean-Christian Imbeault
Subject Re: [bug?] oddity creating table with uppercase initial
Date
Msg-id 3EE33D47.7040801@mega-bucks.co.jp
Whole thread Raw
In response to [bug?] oddity creating table with uppercase initial  (Paul Makepeace <postgresql.org@paulm.com>)
List 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


pgsql-novice by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: [bug?] oddity creating table with uppercase initial
Next
From: Bruno Wolff III
Date:
Subject: Re: Question regarding keyword checkboxes in database design