December 9th, 2012, 12:41 PM
Uppercase role and schema names (for SSPI)
I'm working on using SSPI authentication over PostreSQL (v.8.4 & 9.1) in a Windows domain.
It appears that my company's Active Directory sends our usernames in UPPERCASE.
No problem : I've created roles & schemas in uppercase to respect that, and the integrated authentication works fine.
Then comes a third party software that uses this DB. It looks that this software requires roles & schemas to be lowercase. The editor refuses considering our request to change that because, he says : "PostgreSQL only supports lowercase".
So the question is... is there an "official" answer to that? Does PostgreSQL support roles & schemas in UPPERCASE, or am I just lucky it works for me (without the 3rd party software)?
(I understand that the "best practice" may be to use lowercase, and I fully understand this. My question is really "is it supported or not?")
Thanks for your answers!
December 9th, 2012, 01:48 PM
PostgreSQL does support schema names in uppercase. They have to be quoted though:
That follow the rules for quoted identifiers as documented in the manual:
create schema "FOOBAR";
I don't however know whether quoted identifiers for roles are supported, but I would very much assume so.
I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags.
Tips on how to ask better questions: