Re: Very strange selectproblem

Поиск
Список
Период
Сортировка
От Csaba Nagy
Тема Re: Very strange selectproblem
Дата
Msg-id 1067949135.30526.14.camel@coppola.ecircle.de
обсуждение исходный текст
Ответ на Very strange selectproblem  (Victor Spång Arthursson <victor@tosti.dk>)
Список pgsql-general
See my comments below.

On Tue, 2003-11-04 at 13:10, Victor Spång Arthursson wrote:
> Can't select 3 columns from a table called varer.
>
> The columns are the three first and are called vnummer, puNr and dNr.
>
> The error message is:
>
> indiadan=# select varer.vNummer from varer;
                        ^^^^^^^^^^
                        this is upper case N
> ERROR:  No such attribute varer.vnummer
                                  ^^^^^^^
                        this is lower case n in vnummer

The problem could be that you created the table with the name of the vNummer column enclosed in double quotes, like
this:"vNummer". 
In this case postgres remembers the case of the field name. Names are case sensitive in postgres.
In your query, you don't enclose the field names in double quotes, like: varer.vNummer, which is folded to all lower
caseby postgres, and won't match the mixed case field you have created. 
Try to quote the field names in the query, it will likely work.
A good practice to avoid such errors is to always use lower case names with postgres.

HTH,
Csaba.


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

Предыдущее
От: Rob Fielding
Дата:
Сообщение: Re: pg7.3.4: pg_atoi: zero-length string
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: pg7.3.4: pg_atoi: zero-length string