문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top