Re: Referencing created tables fails with message that

Поиск
Список
Период
Сортировка
От Tommy Svensson
Тема Re: Referencing created tables fails with message that
Дата
Msg-id 42230581.2080303@tommysvensson.net
обсуждение исходный текст
Ответ на Referencing created tables fails with message that they do not exist!  (Tommy Svensson <tommy@tommysvensson.net>)
Ответы Re: Referencing created tables fails with message that  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
Thanks for all the replys, I got quite a lot of them, and haven't had
time to read them all yet, but
one common comment I get is "You didn't supply enough information" , "be
more specific", etc.

You are of course right.

 From the answers I got however, it seems to be a very high propability
that it is
different case in table name between create and select, etc that causes
the problem. It does
make sense (now). I got the suggestion to quote the table names. I also
switched tools
after creating the first table and trying to create the next since the
first tool was so simple
it did not support foreign keys. That was probably a bad thing to do :-)
I will drop the
table in the tool that created it and then recreate them in the same
tool and quote the names
as suggested. I'm quite sure that will solve my problem.

<inMyDefense skip="OK">
- I've used Oracle, DB2, Mimer, and HSQLDB before, and my experience
with these led me
  to beleive that SQL was case insensitive. In fact, I was so sure of it
that a case problem
  just never occured to me.
- Since I could create the table I assumed it was OK and there were no
point in describing
  the table.
</inMyDefense>

Regards,
Tommy Svensson

Tino Wildenhain wrote:

>Am Sonntag, den 27.02.2005, 18:50 -0500 schrieb Tommy Svensson:
>
>
>>I have just installed Postgresql and tried it for the first time.
>>
>>One very serious problem I ran into was when actually trying to use
>>created tables.
>>Creating a simple table without any foreign keys works OK, but after
>>creating the
>>table it is not possible to do a select on it! I tried the following
>>variants:
>>
>>SELECT * FROM <table>;
>>SELECT * FROM public.<table>;
>>SELECT * FROM <schema>.public.<table>;
>>
>>All result in the message "The relation <table> does not exist!" or "The
>>relation public.<table> does not exist!".
>>
>>Creating a new table with a foreign key referencing the first table is
>>also impossible due to exactly the same error message!
>>
>>This behaviour is the same using  DBVisualizer/jdbc or psql.
>>
>>So the question is how do you actually reference the tables you have
>>created so that postgres will find them ?
>>The tables do actually get created. I can se them in DBVisualizer.
>>
>>I'm using version 7.4.5 on Linux Mandrake 10.1.
>>
>>
>
>You should have provided an exact example of _how_ do you create
>your tables.
>
>I bet you created tables with mixed case (in a tool?) but dont use the
>" " quoting on these table names when you select.
>
>
>
>
>
>


В списке pgsql-general по дате отправления:

Предыдущее
От: Konstantin Danilov
Дата:
Сообщение: PostgreSQL 8 compiling for Windows
Следующее
От: "Sean Davis"
Дата:
Сообщение: Re: Reading from Mysql & writting in PGsql