Обсуждение: ERROR: relation "mytable" does not exist

Поиск
Список
Период
Сортировка

ERROR: relation "mytable" does not exist

От
"Peter Schonefeld"
Дата:
Hi, I'm a postgres newbie trying to convert a small SQL Server database to
postgres 8.0 .

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 function reference.

Any help would be appreciated.

Regards
Pete



Re: ERROR: relation "mytable" does not exist

От
Peter Eisentraut
Дата:
Peter Schonefeld wrote:
> CREATE TABLE "Country"

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

If you write "Country" once, then you might write "Country", not
Country, all the time, because otherwise the name will be converted to
lower case.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/