From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Sharon Abu <Sharon_Abu(at)PacketLight(dot)com> |
Cc: | "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Problem with inserting data into a table..... |
Date: | 2005-02-22 12:32:13 |
Message-ID: | 421B264D.4030002@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Sharon Abu wrote:
> Hi All,
>
> new to postgreSQL.....
>
> I'm running postgreSQL 8.0.1 on win 2k and and i have created a database
> (for testing....) using pgAdmin-III application
> i'v'e also managed to create table with just few simple columns... so far so
> good.
> the name of the table & its columns are correct (I've checked it....)
>
> The execution fails with the following message : ERROR: relation
> "col_led_tbl" does not exist
Actually, the name of the table isn't correct.
You'll have created it using pgAdmin as an upper-case table, and are
trying to access it folded to lower-case (as in the error message).
If you create/query tables without quotes they get folded to lower-case.
Quoting creation/queries preserves case.
So:
CREATE TABLE "Foo" ...
SELECT * FROM "Foo" (works)
SELECT * FROM Foo (fails, gets folded to lower-case)
CREATE TABLE Bar ...
SELECT * FROM Bar (works)
SELECT * FROM BAR (works)
SELECT * FROM "bar" (works)
SELECT * FROM "Bar" (fails - it was created as lower-case)
You might find section 4.1 of the manuals useful, as well as the FAQ
http://www.postgresql.org/files/documentation/faqs/FAQ.html
In fact, if possible make a nice hot cup of tea/coffee, put a favourite
CD on, put up your feet and read the FAQ and first third of the manuals
before going any further. Time well spent, I can guarantee it.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Ragnar Hafstað | 2005-02-22 12:37:06 | Re: Problem with inserting data into a table..... |
Previous Message | Pavel Stehule | 2005-02-22 12:29:19 | Re: How iterate records |