Accessing Tables and Data of the postgres database


I have a postgreSQL database as you can see in my application. Application is deployed and running. I can register new users, login etc… so I know the database works. I would like to see the tables and data inside this database. I have tables like AspNetUsers, AspNetRoles as you can see below

I connected successfully to this database in the command line through flyctl postgres connect -a beautifulpolish-db. When I run \l command I get the below result. I also set the database to beautifulpolish already by command \c beautifulpolish

After running \d or \dt command I get did not find any relation. I tried already everything I found online to fix this and nothing seems to work and I don’t know what I’m doing wrong or where the problem is.

Below list of schemas and search path
I4

And below more data. I also tried to run \dt as postgres current_user - same result, did not find any relations. As you can see the access is granted

I also tried with changing the search path to beautifulpolish as below, also did not work
I6

Does someone have any idea how to do this? Where is the problem? Thank you in advance

Hi, thanks for all the details! Your \l list shows both…

beautifulpolish

and

beautifulpolish?sslmode=disable

…as two separate databases. My guess is that your missing tables made their way into the latter.

(Aside: the root cause may be a parsing error in your ASP database configuration—causing it to run migrations in this new, unconventional location.)

Okay thanks, do you have any idea how to fix this? :slight_smile:

You do have to fight psql’s syntax to get this to work:

\c "dbname=beautifulpolish?sslmode=disable port=5433 user=postgres"

(The reason is that = is magic in this context.)

After you’ve fixed your connection-string parsing, it would probably be a good idea to rename this database, :dragon:

Thank you so much, the tables are there indeed. I have one more question though, maybe you will know. I have asp.net identity set up, should I despite that configure postgres database to SSL mode enabled?
And where this parsing error might be, how to go about finding it and fixing it?

I’m sorry but I’m new to backend and databases, I would appreciate any tips

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.