Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2002
    Location
    Brazil
    Posts
    56

    Unanswered: Newbie with problems with Double Quotes

    People,
    I'd like to execute queries in PostGreSQL withou have to specify the table name with double Quotes.

    To work my query must be like this:
    Code:
    select * from "consolidado"
    I'd like to execute it like this:
    Code:
    select * from consolidado

    How can i COnfiogure this???
    Diogo Hudson Dias
    DBA - SQL 6.5/7.0/2000
    ASBACE - ATP

  2. #2
    Join Date
    Sep 2002
    Location
    Brazil
    Posts
    56
    Correcting:
    I want
    Select ctzCod From consolidado

    And it only works with
    select "ctzCod" from consolidado


    I wouldn't like to use the double quotes in the column names.
    Diogo Hudson Dias
    DBA - SQL 6.5/7.0/2000
    ASBACE - ATP

  3. #3
    Join Date
    Feb 2004
    Posts
    7
    Then make all of your column names start with ascii and make them all lower case.. which is what I do and my stuff is fine.. I think that if you don't put it in double quotes then it assumes all lower case.. so if you make a col call TEst and try and select it without double quotes it will fail.. but if you make a col call test then you are ok. Also if any of you col's start with numeric then you are going to need to double quote.

    Travis

  4. #4
    Join Date
    Feb 2004
    Posts
    14
    Travis is correct. According to the manual: "Quoting an identifier also makes it case-sensitive, whereas unquoted names are always folded to lower case.".

  5. #5
    Join Date
    Sep 2002
    Location
    Brazil
    Posts
    56

    Talking

    All that you say are correct.
    But my problem was that I created the tables with the Double Quotes in the Colum names.
    Diogo Hudson Dias
    DBA - SQL 6.5/7.0/2000
    ASBACE - ATP

  6. #6
    Join Date
    Feb 2004
    Posts
    7
    Unless you want to drop the col's and recreate then you stuck with using the double quotes.. that I know of there is no way around that.. unless you created all of your col's in lowercase..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •