Today I learnt about Postgres user 🐘

Today I learnt about the Postgres user function. While working on my side project Focust I saw some strange behaviour trying to to select all users from my user table:

select * from user;
(1 row)

It turns our that user is a keyword in Postgres which gets the current user so to select from the table I need to run select * from "user";. Here’s a more in-dept explanation.