[bug?] oddity creating table with uppercase initial

From: Paul Makepeace <postgresql(dot)org(at)paulm(dot)com>
To: PostgreSQL Novice <pgsql-novice(at)postgresql(dot)org>
Subject: [bug?] oddity creating table with uppercase initial
Date: 2003-06-02 22:07:24
Message-ID: 20030602220724.GG6093@mythix.realprogrammers.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

[psql (PostgreSQL) 7.2.1 and 7.3.2 on Debian testing]

Creating a table "Banks" succeeds but then appears not to exist. It does
however show in a \d listing, but won't autocomplete(!) i.e. \d Ba<tab>

On a newly created db,

=> 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
=> select * from Banks;
ERROR: Relation "banks" does not exist
=> CREATE TABLE "banks" ("id" integer DEFAULT nextval('"Banks_id_seq"'::text) NOT NULL);
CREATE
=> \d
List of relations
Name | Type | Owner
--------------+----------+----------
Banks | table | ...
banks | table | ...
banks_id_seq | sequence | ...
(3 rows)

(The 7.3.2 appears to behave identically except with its listing of the
schema being public in \d)

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

Paul

--
Paul Makepeace ....................................... http://paulm.com/

"What is a quigibo? A yeast infection gone wrong."
-- http://paulm.com/toys/surrealism/

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Wil Duis 2003-06-04 09:23:22 Re: Calculation error
Previous Message Josh Berkus 2003-06-02 17:23:38 Re: nOOB Question..