#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    1
    Rep Power
    0

    Uppercase role and schema names (for SSPI)


    Hi all,
    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!

    cedven
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,785
    Rep Power
    348
    PostgreSQL does support schema names in uppercase. They have to be quoted though:
    Code:
    create schema "FOOBAR";
    That follow the rules for quoted identifiers as documented in the manual:

    http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS

    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.
    http://forums.devshed.com/misc.php?do=bbcode#code

    Tips on how to ask better questions:
    http://tkyte.blogspot.de/2005/06/how-to-ask-questions.html
    http://wiki.postgresql.org/wiki/SlowQueryQuestions
    http://catb.org/esr/faqs/smart-questions.html

IMN logo majestic logo threadwatch logo seochat tools logo