I have a table that was dumped to Postgres using Pandas and Pandas can read it just fine using the read_sql_table
command but I can't seem to be able to access it using SQL. When I run the \dt
command, I get the table listed under the public schema as one of the existing tables.
List of relations
Schema | Name | Type | Owner
--------+------------------------------------+-------+----------
public | "e7b6a2e19789418e9e48fd34e981b036" | table | postgres
But when I run SELECT * FROM "e7b6a2e19789418e9e48fd34e981b036";
I get the relation does not exist error. I have tried the following:
SELECT * FROM "e7b6a2e19789418e9e48fd34e981b036"
SELECT * FROM "public"."e7b6a2e19789418e9e48fd34e981b036"
- Granted usage to public schema to the user by doing
GRANT USAGE ON SCHEMA public TO postgres;
- Checked this stack overflow answer that suggest it might be the identifier length is too long but my identifier length is 32 bytes with Postgres allowing up to 63 bytes by default
When I run SHOW search_path;
it shows "$user", public
which is what it should be but for some reason Postgres keeps saying the relation does not exist.
Other helpful information:
- I'm running Postgres in a docker container from here
Any idea on what might be causing the error here?