Conflit between my table "user" and metabase keyword "user"


I have a table named "user" which I obviously use a lot :slight_smile:, when I try to select from it directly it doesn't work as I would expect:

SELECT * From user;

It only returns my postgresql user instead of the content of my table user.

To get the content of the table I have to add quotes:

SELECT * From "user";

It's working but is a bit annoying, is it possible to override the keyword user in order to select from my table user without quotes?


you should be changing your table name. Also, postgres needs double quotes in table names, always

Thanks for your suggestions! Could you elaborate a bit on why is it better to change the table name? user is the default table for users with my stack NestJS / TypeORM

well... leave it as it is, but you'll need double quotes always to call a table in postgres, never without it