0

After doing migrations in a Django project I'm having to use quotes in SQL transaction in psql?

SELECT * FROM ClientProfile;
ERROR:  relation "clientprofile" does not exist
LINE 1: SELECT * FROM ClientProfile;

SELECT * FROM "ClientProfile";                                                 

The second select Works!

a_horse_with_no_name
  • 497,550
  • 91
  • 775
  • 843
Don Fox
  • 21
  • 3
  • You have to use the double quotes, because you created the table using double quotes – a_horse_with_no_name Dec 30 '21 at 21:43
  • That is because the table name is mixed case. So at some point the name was double quoted to preserve case and now you have to keep doing that when using it in a query. See [Identifiers](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS) for more information. – Adrian Klaver Dec 30 '21 at 21:44

0 Answers0