I am using strapi and postgres. I created two collections in strapi called "solutions" and "references".
When I run \dt
I get the following output:
...more tables
public | references | table | postgres
public | references_components | table | postgres
public | references_pages | table | postgres
public | references_pages_components | table | postgres
public | solutions | table | postgres
public | solutions_components | table | postgres
public | solutions_pages | table | postgres
public | solutions_pages_components
Now I want to run a SELECT
on table "solutions", which works:
SELECT * FROM solutions;
But when I run SELECT * FROM references;
I get:
ERROR: syntax error at or near "references"
LINE 1: SELECT * FROM references;
I already checked if there is a lock, but nothing. Running \z references
gives the following output:
Access privileges
Schema | Name | Type | Access privileges | Column privileges | Policies
--------+------------+-------+---------------------------+-------------------+----------
public | references | table | postgres=arwdDxt/postgres | |
(1 row)
What could be wrong? Is there maybe an issue with the table being named "references"? This issue happens on my local machine as well on our staging server, so I do not assume that it is an issue with my local postgres setup.
I also checked priviliges with
SELECT table_catalog, table_schema, table_name, privilege_type
FROM information_schema.table_privileges WHERE grantee = 'postgres'
Which gives this output (scroll to the right):
mytable | public | references | INSERT
mytable | public | references | SELECT
mytable | public | references | UPDATE
mytable | public | references | DELETE
mytable | public | references | TRUNCATE
mytable | public | references | REFERENCES
mytable | public | references | TRIGGER