Search Postgresql Archives

Re: Quoting table/column names vs performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux