I managed to create a table in a schema FOO.
Whenever I then try and do anything, like even a basic select, I just get:
ERROR: schema "FOO" does not exist
SQL state: 3F000
Character: 15
I am running the select in the same edit window as I created (using pgAdmin4). I get the same error when I try and create a view call FOO.Info. Yet when I try and create a new table in FOO it works.
What's going on? I am using the same syntax to refer to the table in the select as the create.
# worked fine
CREATE TABLE "FOO"."Events"
(
...
# all these have the error
select * from "FOO"."Events";
select * from FOO.Events;
select * from Foo.Events;
postgres=# \dn
List of schemas
Name | Owner
--------+----------
foo | postgres
public | postgres
(2 rows)
I believe you created it as
create schema FOO;
which creates schema "foo", not "FOO"
And then you reference it as
select * from "FOO".table_name
so it is not found
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With