Notable information
- I am using Postgresql 9.2 on Windows 7 64-bit. It was installed using the installer provided by Postgresql website
- I am logged into the postgres database as postgres
- I create the BryceTest Schema under the postgres user
- I configure
search_pathto show"brycetest, public"
This SQL when generated by the query builder provided by pgAdmin-III works as expected
SELECT "DummyDataMasterTable"."Dummy_PK",
"DummyDataMasterTable"."DummyName"
FROM "BryceTest"."DummyDataMasterTable";
BUT this doesn’t
SELECT DummyDataMasterTable.Dummy_PK,
DummyDataMasterTable.DummyName
FROM BryceTest.DummyDataMasterTable;
-------------------------------------------
ERROR: relation "dummydatamastertable" does not exist
LINE 4: FROM DummyDataMasterTable;
^
********** Error **********
ERROR: relation "dummydatamastertable" does not exist
SQL state: 42P01
Character: 101
FROM BryceTest.DummyDataMasterTable;
Neither does
SELECT
Dummy_PK,
DummyName
FROM DummyDataMasterTable;
-------------------------------
ERROR: relation "dummydatamastertable" does not exist
LINE 4: FROM DummyDataMasterTable; ^
********** Error **********
ERROR: relation "dummydatamastertable" does not exist
SQL state: 42P01
Character: 59
I would THINK that by configuring my schema search_path to look in my newly created schema FIRST it wouldn’t need to have the fully qualified schemaName.tableName
You created the tables using double quotes and therefor they are now case-sensitive (as required by the ANSI SQL standard).
"FooBar"is a different name than"Foobar", howeverFooBarandfoobarare the same name (because they are not quoted).Because you did so, you must quote the table and column names always.
The following works because the identifiers are not quoted:
I would recommend you re-create the tables without any quotes, then you can write table and column names any way you want (as long as you don’t use double quotes).
More details about (quoted) identifiers are in the manual: http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS