How to query verceldb postgres database on vercel.com?

I created a postgres database using Vercel's Postgres solution (https://vercel.com/docs/storage/vercel-postgres). I have a local project with the usual T3 stuffs, where I created two Models (Landmark and Image). I added some data manually, so I headed to the vercel.com storage view where you can browse your database on their website. Good news, the Browse tab works - I can see both tables and the data in them! But then I found the Query tab. I typed in SELECT * FROM landmarks; and it throws Syntax error: relation "landmark" does not exist.. I've tried any number of FROM landark;, from verceldb.landmarks, FROM Landmark;, all with the same error. What am I missing here? To reference them directly, do they have a special name?
2 Replies
lilon3
lilon314mo ago
Hello @Nick you have to add Quotes in your query like so : SELECT * FROM "landmarks" with the correct case sensitivity if you are note using exclusively lowercase in you tables names. cf: https://dba.stackexchange.com/questions/192897/postgres-relation-does-not-exist-error
Database Administrators Stack Exchange
Postgres : Relation does not exist error
I used pg_restore to load my postgres db with a dump file. I connected to my db with my user : sudo -u arajguru psql dump select current_user; current_user -------------- arajguru Now I was a...
Nick
NickOP14mo ago
I had no idea! Thanks @lilon3
Want results from more Discord servers?
Add your server