Обсуждение: Re: double quoted object names

Поиск
Список
Период
Сортировка

Re: double quoted object names

От
"Dave Page"
Дата:

> -----Original Message-----
> From: Terence Kearns [mailto:terencek@isd.canberra.edu.au]
> Sent: 17 July 2003 07:34
> To: Andreas Pflug
> Cc: Dave Page; pgadmin-support@postgresql.org
> Subject: double quoted object names
>
>
> Andreas Pflug wrote:
> > and fooCol is not the same as "fooCol"
>
> What is the deal with this anyway? Everytime I specify an object name
> with mixed case it decides to throw double quotes around it.

It has to otherwise PostgreSQL will fold the identifier to lowercase.

> Also, I created a schema called global (no mixed case) and now
> pgAdminIII refers to all objects in this schema as "global".objectname

Global is probably a reserved word, so must be quoted if used.

Regards, Dave.


Re: double quoted object names

От
Terence Kearns
Дата:
Dave Page wrote:
> It has to otherwise PostgreSQL will fold the identifier to lowercase.
> 

I prefer mixed-case multi-word identifiers rather than identifiers with 
words separated by underscors but I think I will use lowercase 
everywhere from now on :/

> 
>>Also, I created a schema called global (no mixed case) and now 
>>pgAdminIII refers to all objects in this schema as "global".objectname
> 
> 
> Global is probably a reserved word, so must be quoted if used.
> 

you guessed right. I checked up on it at
http://www.postgresql.org/docs/7.3/interactive/sql-keywords-appendix.html

Doesn't seem like there are many words left in the english language that 
aren't reserved ;) I didn't realise there were so many [non-]reserved 
words. Postgres reserves GLOBAL as a "non-reserved" word as opposed to a 
"reserved" word (just read the docs from the above link).

A print out of this list now stays by my side...


-- 
Terence Kearns ~ ph: +61 2 6201 5516
IT Database/Applications Developer
Enterprise Information Systems
Client Services Division
University of Canberra
www.canberra.edu.au



Re: double quoted object names

От
Andreas Pflug
Дата:
Terence Kearns wrote:

>
> Doesn't seem like there are many words left in the english language 
> that aren't reserved ;) I didn't realise there were so many 
> [non-]reserved words. Postgres reserves GLOBAL as a "non-reserved" 
> word as opposed to a "reserved" word (just read the docs from the 
> above link).
>
> A print out of this list now stays by my side...

Hi Terence,
actually we require all pgadmin3 users to *memorize* the complete 
documentation prior to first usage, because we want to reduce the 
distribution and exclude the pgsql documentation :-)

Regards,
Andreas