Thread: ERROR: relation "mytable" does not exist

ERROR: relation "mytable" does not exist

From
"Peter Schonefeld"
Date:
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


Re: ERROR: relation "mytable" does not exist

From
John DeSoi
Date:
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/interactive/functions.html


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