Re: How to run queries without double quotes on tables and columns - Mailing list pgsql-novice

From Thom Brown
Subject Re: How to run queries without double quotes on tables and columns
Date
Msg-id bddc86150910101941o37d8baffp97d4617469ebed83@mail.gmail.com
Whole thread Raw
In response to How to run queries without double quotes on tables and columns  (Susan M Farley <sfarley1@gmu.edu>)
List pgsql-novice
If your object (table, column, view etc) have mixed-case names (e.g. My_Table instead of my_table), you need to quote them.  If you have a table called My_Table but use [SELECT * FROM My_Table;] it won't match as it is treated as if it is all lower-case unless you quote it.  In that case, you'd have to use [SELECT * FROM "My_Table";]. The same applies to any database object.

Regards

Thom

2009/10/11 Susan M Farley <sfarley1@gmu.edu>
Sorry, I'm really new to PostgreSQL and am used to Oracle. In function and in regular queries, I usually have to have double quotes (") around the names of columns and table names. Otherwise, I get an error that the schema, table, or column doesn't exist. I don't always have to though. Sometimes the function works just fine without them even though I am working with the same table and schema. What am I doing wrong?

Thank you,
Susan

--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice

pgsql-novice by date:

Previous
From: Susan M Farley
Date:
Subject: How to run queries without double quotes on tables and columns
Next
From: Tom Lane
Date:
Subject: Re: How to run queries without double quotes on tables and columns