Every solution I see has to do with people having case sensitive column names.
The query select * from users works, but when I say select * from users where username=maxspiri, I get error column maxspiri doesn't exist. Here is my table:
Every solution I see has to do with people having case sensitive column names.
The query select * from users works, but when I say select * from users where username=maxspiri, I get error column maxspiri doesn't exist. Here is my table:
Since maxspiri is a string, you need to wrap it in single quotes.
select * from users where username='maxspiri'
For anyone else looking into this:
Column names in Supabase should be wrapped in double quotes, but strings (values) should be wrapped in single quotes:
SELECT "id" from "table" WHERE "name" = 'some string value'
If your table, or column, has an uppercase in it (e.g. tableName) and if you don't wrap it in double quotes (e.g. "tableName") Supabase will convert it to lower case (e.g. tablename) and it won't find such table/column.
maxspiri is being treated as a column name, not as a string value. To fix this, you need to wrap string literals in single quotes. The corrected query should be
SELECT * FROM users WHERE username='maxspiri';
This ensures that PostgreSQL treats maxspiri as a string value rather than a column name.