Re: Quoting table/column names vs performance - Mailing list pgsql-general

From Craig Ringer
Subject Re: Quoting table/column names vs performance
Date
Msg-id 47FCFDE6.4000304@postnewspapers.com.au
Whole thread Raw
In response to Re: Quoting table/column names vs performance  (Jozef Ševčík <sevcik@styxsystems.com>)
List 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 by date:

Previous
From: leoabhi
Date:
Subject: Re: connecting VB to postgreSQL
Next
From: Tom Lane
Date:
Subject: Re: Postgresql 8.3: stats collector process eat all CPU all time