Re: Without schemas

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Without schemas
Дата
Msg-id 49D3A992.EE98.0025.0@wicourts.gov
обсуждение исходный текст
Ответ на Without schemas  (Félix Sánchez Rodríguez <fesanch@ciego.cult.cu>)
Список pgsql-admin
>>> Félix Sánchez Rodríguez <fesanch@ciego.cult.cu> wrote:
> I've figured out that it's not the same to use 'SELECT NICK FROM
> USUARIOS' vs. 'SELECT "Nick" from "Usuarios"'

In PostgreSQL the first is interpreted the same as:

SELECT "nick" from "usuarios";

Note that this is different from the ANSI & ISO standards, which
require it to be interpreted as:

SELECT "NICK" FROM "USUARIOS";

Neither of the above would find a column "Nick" or a table "Usuarios".

For maximum portability, you might want to always quote your
identifiers, regardless of whether they are all uppercase, all
lowercase, or mixed case.  An alternative, which has worked for some,
is to never quote your identifiers and always use lower case.  I've
seen software which breaks without the quotes on either
capitalization, but the lowercase is currently more popular in more
quarters, and seems to break less often.  It's certainly safe it
you're planning to target PostgreSQL and don't care about portability.

-Kevin

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

Предыдущее
От: "Daniel J. Summers"
Дата:
Сообщение: Re: Without schemas
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Vacuum Full