Heroku PostrgreSQL client doesn't find relations

大城市里の小女人 提交于 2020-01-17 03:09:51

问题


I am using Heroku and his PostgreSQL addon. When I login to pg:psql and do:

SELECT table_name FROM information_schema.tables WHERE table_schema='public';

I see all my tables:

Users
Cities
Registrations

Which is expected.
But when I do:

select * from users;

Result is :

ERROR:  relation "users" does not exist
LINE 1: select * from users;

Does anyone knows what am I doing wrong?


回答1:


Classic problem with mixed case identifiers.

Try:

select * from "Users";

Read the chapter Identifiers and Key Words in the manual.
To make your life easier only use legal, lower case identifiers, or you have to double-quote the names.



来源:https://stackoverflow.com/questions/22886505/heroku-postrgresql-client-doesnt-find-relations

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!