Why does Postgresql say "schema does not exist"

How can I make this request work?

SELECT weather.id, cities.name, weather.date, weather.degree FROM weather JOIN weather.city_id ON cities.id WHERE weather.date = '2011-04-30'; 

ERROR: The weather pattern does not exist.

the weather is not a diagram, it is a table!

+6
source share
1 answer

may be:

 SELECT weather.id, cities.name, weather.date, weather.degree FROM weather JOIN cities ON (weather.city_id = cities.id) WHERE weather.date = '2011-04-30'; 

postgres complains about the connection on weather.city_id , which is interpreted as a table / view called "city_id" in the "weather" schema

+8
source

Source: https://habr.com/ru/post/886945/


All Articles