Databases

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • R: Case sensitivity? - I understood...

    1 answers - 1783 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Dear Sirs,
    I understood that I can create objects with Upper and Lower case but I have
    to reference it with double quotes (INSERT INT "Accoglienza"
    ("IdAccoglienza") VALUES (15);" is ok)
    The new question is: can I avoid the automatic conversion to lower case in
    Postgres? (it exist some parameter to adjust?)
    Best regards.
    D. Formenton
    originale
    Da: dfx [mailto:dfx (AT) dfx (DOT) it]
    Inviato: 27 dicembre 2005 15:55
    A: 'pgsql-general (AT) postgresql (DOT) org'
    : Case sensitivity?
    Dear Sirs,
    I have a little problem:
    - Contest: Server side: Linux Fedora core 4 with PostgreSQL v. 8.0
    Client side: both Linux Fedora core 4 with pgAdmin III v.
    1.4 and/or Windows 2000 server vith pgAdmin III v. 1.4
    - I Made a table:
    CREATE TABLE "Accoglienza"
    (
    "IdAccoglienza" int4 NT NULL DEFAULT
    nextval('public."Accoglienza_IdAccoglienza_seq"'::text),
    "IdCongresso" int4 NT NULL DEFAULT 0,
    CNSTRAINT "Accoglienza_Pk" PRIMARY KEY ("IdAccoglienza")
    )
    WITHUT IDS;
    if I try "INSERT INT Accoglienza (IdCongresso) VALUES (23)"
    I get an error "ERRR: la relazione "accoglienza" non esiste" (The
    relation "accoglienza does not exist")
    please note the change of the case of "A" to "a";
    if I rename the table to "accoglienza" the error disappear, but arise
    another error on "IdAccoglienza" that change in "idaccoglienza". (i.e. all
    converted to lower case)
    The same error arise with window client and linux client.
    How I can set case-insensitive the system, or avoid the conversion to
    lower case?
    It depends on setting of pgAdmin or on setting of the server?
    Thank you.
  • No.1 | | 1472 bytes | |

    You can't, you have to double qoute everything that has upper or mixed
    case. It can become a huge PITA

    The easiest way to get around this is to use lower case for all your DDL
    i.e. columns, tablenames etc.

    There is no practical reason to use uppercase or mixed case excecpt for
    purly visual reasons, i.e. it looks nice or it's easier to read.

    I use all lower case and no one using my applications ever has to know.

    I can see doing the mixed case if you where porting a large database
    from some other system like MS SQL server and it would be a large task
    to lower case everthing, but even then it's not that big of a deal to
    switch to all lower case.

    What I have done in these cases is to export the DDL from MS SQL server
    to text files, then run the scripts in PGLA or similar, if nothing is
    qouted Postgresql will convert everything for you, problem solved.

    Hope this helps,

    Tony Caduto
    AM Software Design

    Home of PG Lightning Admin for Postgresql

    How I can set case-insensitive the system, or avoid the conversion
    to lower case?

    It depends on setting of pgAdmin or on setting of the server?

    Thank you.

    (end of broadcast)
    TIP 1: if posting/reading through Usenet, please send an appropriate
    subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
    message can get through to the mailing list cleanly

Re: R: Case sensitivity? - I understood...


max 4000 letters.
Your nickname that display:
In order to stop the spam: 1 + 1 =
QUESTION ON "Databases"

EMSDN.COM