1

I am working on a project with Django 1.7 and PostgreSQL. When I access database tables through the Django admin it's working fine, but when I try to access those tables from the PostgreSQL console some are working fine, but some throw an error.

For example, the following query works.

select * from post_my;
id | owner_id | content
---+----------+---------
(0 rows)

However, the following query does not:

select * from Doctors_city;

ERROR: relation "doctors_city" does not exist

LINE 1: select * from Doctors_city;

I tried to search on google and stack, but not getting any use full solution.

Lukasz Szozda
  • 162,964
  • 23
  • 234
  • 275
Harshit Chauhan
  • 155
  • 2
  • 11
  • 1
    What are the queries/commands you run on the postgres console that give you the error? – Bernhard May 04 '15 at 12:15
  • select * from post_my; id | owner_id | content ----+----------+--------- (0 rows) it's working fine but select * from Doctors_city; ERROR: relation "doctors_city" does not exist LINE 1: select * from Doctors_city; – Harshit Chauhan May 04 '15 at 12:28
  • 3
    All identifiers that are not double-quoted are folded to lowercase in PostgreSQL (cf [this question](http://stackoverflow.com/a/20880247/1644198)) so you need to do: `select * from "Doctors_city"; ` – aumo May 04 '15 at 12:44

0 Answers0