Running \dt inside a psql shell results in "Did not find any relations"

Fixed:
Ugh. Found the solution and it’s just very obvious.

flyctl postgres connect -a <my-postgres-app-name> connects to the postgres database as user postgres.
I simply had to list the other databases using \l or \list and then \c <database-name> to connect to it. Running \dt then works and lists all the tables I was missing.

Unless one of the admins deem otherwise, figured I keep the topic alive along with my answer as it might help someone else.

5 Likes