Обсуждение: CreateTable --> schema not found

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

CreateTable --> schema not found

От
Josef Springer
Дата:
Hi,

sorry, i am a PostgesSQL beginner:
  • I  started the pgadmin tool as superuser.
  • Created the database OfficeTalk
  • Created the schema OfficeTalk with same permissions as the template pg_template_1
  • If i create the table OfficeTalk.absent .... >>> schema not found
  • Creating the same table in schema pg_template_1 works fine.
I could not found any solution. Can anybod help me ?
--

Best Regards,
Josef Springer

 -- the software company --

Orlando-di-Lasso Str. 2
D-85640 Putzbrunn

Tel.++49(0)89 600 6920
Fax++49(0)89 600 69220
mailtoJosef.Springer@joops.com
Website http://www.joops.com
Вложения

Re: CreateTable --> schema not found

От
Ropel
Дата:
I think it's because of uppercase letters: if you don't quote ... create table "OfficeTalk.absent" ....  , postgresql will lowercase everything
regards

Josef Springer wrote:
Hi,

sorry, i am a PostgesSQL beginner:
  • I  started the pgadmin tool as superuser.
  • Created the database OfficeTalk
  • Created the schema OfficeTalk with same permissions as the template pg_template_1
  • If i create the table OfficeTalk.absent .... >>> schema not found
  • Creating the same table in schema pg_template_1 works fine.
I could not found any solution. Can anybod help me ?
--

Best Regards,
Josef Springer

 -- the software company --

Orlando-di-Lasso Str. 2
D-85640 Putzbrunn

Tel.++49(0)89 600 6920
Fax++49(0)89 600 69220
mailtoJosef.Springer@joops.com
Website http://www.joops.com

Вложения

Re: CreateTable --> schema not found

От
Richard Huxton
Дата:
Josef Springer wrote:
>   Hi,
>
> sorry, i am a PostgesSQL beginner:
>
>     * I  started the pgadmin tool as superuser.
>     * Created the database /OfficeTalk/
>     * Created the schema /OfficeTalk/ with same permissions as the template
>       /pg_template_1/

Are you sure pg_template_1 isn't a database?

>     * If i create the table /OfficeTalk.absent/ .... >>> * schema not found*
>     * Creating the same table in schema /pg_template_1/ works fine.

If not, I'd suspect quoting issues. Fire up psql and do a \dn to see
what schemas are actually in your database - if they were quoted when
they were created they'll maintain their case, otherwise they'll be
lower-case.

Once you create something with mixed-case you'll always need to
reference it quoted, e.g.

CREATE TABLE "OfficeTalk".absent (
  a int4,
  ...
);

--
   Richard Huxton
   Archonet Ltd