Home > Archive > PostgreSQL Newbies > May 2005 > ERROR: relation "mytable" does not exist









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ERROR: relation "mytable" does not exist
Peter Schonefeld

2005-05-05, 9:23 am

Hi, I'm a postgres newbie trying to convert a small SQL Server database for
a non-commercial site to postgres 8.0 in windows xp.

A typical table that i've created looks like this...

CREATE TABLE "Country"
(
"Id" int2 NOT NULL,
"Name" varchar(50) NOT NULL,
CONSTRAINT "PK_Country" PRIMARY KEY ("Id")
)
WITHOUT OIDS;
ALTER TABLE "Country" OWNER TO postgres;
COMMENT ON TABLE "Country" IS 'listing of countries';

If i try SELECT * FROM Country, i get 'ERROR: relation "country" does not
exist.

Also, I'm looking for a good reference on functions.

Any help would be appreciated.

Regards
Pete


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere
" to majordomo@postgresql
.org)

John DeSoi

2005-05-05, 9:23 am


On May 5, 2005, at 9:12 AM, Peter Schonefeld wrote:

> If i try SELECT * FROM Country, i get 'ERROR: relation "country" does
> not
> exist.


If you double quote the table and column names, you'll have to use it
that way everywhere in your code. Try

SELECT * FROM "Country";

>
> Also, I'm looking for a good reference on functions.
>


http://www.postgresql.org/docs/8.0/.../functions.html


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com