Re: Quoting table/column names vs performance

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Quoting table/column names vs performance
Дата
Msg-id 47FCFDE6.4000304@postnewspapers.com.au
обсуждение исходный текст
Ответ на Re: Quoting table/column names vs performance  (Jozef Ševčík <sevcik@styxsystems.com>)
Список pgsql-general
Jozef Ševčík wrote:
> So it all depends on how table is exactly created, thank you.
>
> A last question - is there any way how to 'switch' this for
> table without re-creating table again ?
>
ALTER TABLE "MixedCase" RENAME TO "lowercase";

The double quotes are optional on all lower case identifiers.

The tables you're dealing with are not, as far as I know, specially
flagged as case sensitive or "needs double quotes". They just happen to
have names containing upper case characters. As PostgreSQL flattens
unquoted identifiers to lowercase, that means that you need to double
quote them. There's nothing special about TableName vs tablename vs
TABLENAME, at least as far as I know.

You can double quote all identifiers and I think many automated query
building tools do just that. It's just a pain to type.

--
Craig Ringer

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

Предыдущее
От: leoabhi
Дата:
Сообщение: Re: connecting VB to postgreSQL
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Postgresql 8.3: stats collector process eat all CPU all time