Re: How to run queries without double quotes on tables and columns

Поиск
Список
Период
Сортировка
От Thom Brown
Тема Re: How to run queries without double quotes on tables and columns
Дата
Msg-id bddc86150910101941o37d8baffp97d4617469ebed83@mail.gmail.com
обсуждение исходный текст
Ответ на How to run queries without double quotes on tables and columns  (Susan M Farley <sfarley1@gmu.edu>)
Список pgsql-novice
If your object (table, column, view etc) have mixed-case names (e.g. My_Table instead of my_table), you need to quote them.  If you have a table called My_Table but use [SELECT * FROM My_Table;] it won't match as it is treated as if it is all lower-case unless you quote it.  In that case, you'd have to use [SELECT * FROM "My_Table";]. The same applies to any database object.

Regards

Thom

2009/10/11 Susan M Farley <sfarley1@gmu.edu>
Sorry, I'm really new to PostgreSQL and am used to Oracle. In function and in regular queries, I usually have to have double quotes (") around the names of columns and table names. Otherwise, I get an error that the schema, table, or column doesn't exist. I don't always have to though. Sometimes the function works just fine without them even though I am working with the same table and schema. What am I doing wrong?

Thank you,
Susan

--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice

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

Предыдущее
От: Susan M Farley
Дата:
Сообщение: How to run queries without double quotes on tables and columns
Следующее
От: Tom Lane
Дата:
Сообщение: Re: How to run queries without double quotes on tables and columns